2014-05-14

pyramid, apache, virtual hosting

I was on the lookout for the good old ++vh++ ZTK virtual hosting solution for Pyramid.
This is the opposite of the X-Vhm-Root mode.

Turned out to be a bit complicated.

The simplified solution is:

paster.ini:

...
[filter:paste_prefix]
use = egg:PasteDeploy#prefix

[pipeline:main]
pipeline =
    paste_prefix
    your.app
...
apache config:

<VirtualHost 192.168.1.1:443>
    ServerName ops.acme.org
    DocumentRoot d:/wwwroot/empty

    RewriteEngine on
 
    RequestHeader set X-FORWARDED-SCHEME https

    <Location /sv1>
        RequestHeader set X-FORWARDED-HOST ops.acme.org/sv1
    </Location>
    RewriteRule ^/sv1/(.*) http://192.168.1.1:9000/$1 [P,L]
    
    <Location /sv2>
        RequestHeader set X-FORWARDED-HOST ops.acme.org/sv2
    </Location>
    RewriteRule ^/sv2/(.*) http://192.168.1.2:9000/$1 [P,L]
</VirtualHost>



2014-04-30

xfce4 4.11, xubuntu 14.04, how to turn off session saving even HARDER

As kiosk mode also does not seem to work, create an upstart script:


start on (starting lightdm
          or starting kdm
          or starting xdm
          or starting lxdm)

description "kill XFCE sessions hard"
author  "Adamg"

task
normal exit 2

script 
 cd /home/username/.cache/sessions
 rm -rf *
 console output

end script
Replace username with yours. Enjoy a session free startup.

2014-04-24

xfce4 4.11, xubuntu 14.04, how to turn off session saving HARD

If the obvious

settings -> settings manager -> session & Startup -> general -> Automatically save session

way does not work,

sudo mkdir /etc/xdg/xfce4/kiosk
sudo nano /etc/xdg/xfce4/kiosk/kioskrc
[xfce4-session]
SaveSession=NONE

taken from
http://askubuntu.com/questions/250630/how-can-i-turn-off-xfce-session-saving-system-wide

2014-04-23

fixing skype + pulseaudio sound issues

env PULSE_LATENCY_MSEC=30 /usr/bin/skype

2014-04-22

updating to xubuntu 14.04

Being blessed with a hp 8470w with an AMD radeon ubuntu provided fglrx works quite OK.
Having some rendering issues with synaptic and chromium.
Installing fglrx-pxpress hold around 5W less power usage according powertop.

2014-04-06

How to or not to interview (IT)

I was reading various blog entries about interviews and various stuff around getting hired as I was looking for my next gig.
This would have been a nice blog series, but I got hired again, so I'm dumping here the most interesting ones for fellow job seekers and eventual employers reading.

The negatives:

The positives:

Tips and tricks of trade:

Tips for employers:

Note, my viewpoint is very subjective, I have the wanna be hired stake.

After reading all this stuff, if I could choose I would want a CV check, phone/skype screen, then work a few payed days on site. No whiteboard coding please -- who wants to swim dry?





2012-07-20

Persisting Chromium options on linux

Well, windows has a registry, linux has .profile.



Add to ~/.profile :
export CHROMIUM_USER_FLAGS="--disk-cache-dir=/tmp --disk-cache-size=50000000"