Sunday, December 14, 2014

openwrt vlan

BEFORE:

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname '@wan'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'



config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 4 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 5t'
============================================================
AFTER:

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname '@wan'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'
# allow vlan numbers greater 15 (dir320 doesn't support this, tp-link 1043nd does):
        option enable_vlan4k '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '1 2 3 5t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0 5t'

config switch_vlan
        option device 'switch0'
        option ports '0t 4'
        option vlan '16'

config interface 'iptv'
        option proto 'none'
        option ifname 'eth0.16'

Monday, December 8, 2014

perl -d:ptkdb script.pl

cat >> ~/.Xresources

ptkdb*scrollbars: se
ptkdb.frame2.frame1.rotext.balloon.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*                       /* Hot Variable Balloon Font */

           ptkdb.frame*font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*                           /* Menu Bar */
           ptkdb.frame.menubutton.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*                /* File menu */
           ptkdb.frame2.frame1.rotext.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*            /* Code Pane */
           ptkdb.notebook.datapage.frame1.hlist.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*  /* Expression Notebook Page */

           ptkdb.notebook.subspage*font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*               /* Subroutine Notebook Page */
           ptkdb.notebook.brkptspage*entry.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*       /* Delete Breakpoint Buttons */
           ptkdb.notebook.brkptspage*button.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*      /* Breakpoint Expression Entries */
           ptkdb.notebook.brkptspage*button1.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*     /* Breakpoint Expression Entries */
           ptkdb.notebook.brkptspage*checkbutton.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-* /* Breakpoint Checkbuttons */
           ptkdb.notebook.brkptspage*label.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*       /* Breakpoint Checkbuttons */

           ptkdb.toplevel.frame.textundo.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*         /* Eval Expression Entry Window */
           ptkdb.toplevel.frame1.text.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*            /* Eval Expression Results Window */
           ptkdb.toplevel.button.font:  -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*                /* "Eval..." Button */
           ptkdb.toplevel.button1.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*                /* "Clear Eval" Button */
           ptkdb.toplevel.button2.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*                /* "Clear Results" Button */
           ptkdb.toplevel.button3.font: -*-fixed-*-*-*-*-24-*-*-*-*-*-iso8859-*                /* "Clear Dismiss" Button */
ptkdb*stopfont: -*-courier-bold-r-*-*-24-*-*-*-*-*-iso8859-*


xrdb -override ~/.Xresources

Sunday, December 7, 2014

Office 2010 with playonlinux on ubuntu

sudo apt-get install ttf-mscorefonts-installer # from command line - select OK
install playonlinux # from software center
run installer from wine and during office install don't select components - just proceed
after installation create ~/.local/share/applications/PlayOnLinux.desktop with the following content:

[Desktop Entry]
Version=1.0
Name=PlayOnLinux
GenericName=PlayOnLinux
Type=Application
Exec=playonlinux %U
Icon=playonlinux
MimeType=application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;application/vnd.openxmlformats-officedocument.wordprocessingml.document;application/vnd.ms-excel;application/vnd.ms-word
#Categories=Office;
OnlyShowIn=NEVER; # this is a trick to hide it from all the menus

Then set file associations for double click: right-click on files with all extension types (doc, docx, xls, xlsx, ...) and select "open with application..." -> playonlinux -> enable "always use for this type of file"