Labels

css (1) jQuery (7) linux (38) mac (70) php (29) python (1) svn/git (9) trac (4) ubuntu (1) virtualbox (6) vista (2) windows (14)

Thursday, 17 June 2010

Debian ssh virtual box and ServerAliveInterval

Normally when I use SSH I have ServerAliveInterval set to keep the connection alive. Now my testing machine is a debian installation using virtual box, now for some reason when the server went idle and a SSH connection was open after a little while the whole server network just lagged, it responded fine to local input but all network traffic flaked. Turning off ServerAliveInterval has fixed it.

JQuery get query string

The following function returns the query string using JQuery

$.getQueryString = function()
{
str = new RegExp('\\?([^#]*)').exec(window.location.href);
if(!str) return [];
return str[1].split('&');
}

Monday, 7 June 2010

Single App Dock

This is kinda cool, I could see it being handy when wanting to focus on just one thing.

http://osxdaily.com/2010/06/07/enable-single-application-mode-in-mac-os-x/

Loading kernel modules at startup ubuntu (modprobe)

To make a kernel module load at bootup in ubuntu just add the name of the module to /etc/modules i.e. for fuse you would need to add "fuse" simple!

Sunday, 6 June 2010

Purging configuration files in ubuntu/debian

If you've uninstalled a bunch of apps in debian/ubuntu and want to purge the configuration files, use the following command

dpkg --list | grep '^rc\b' | awk '{ print $2 }' | xargs sudo dpkg -P


found at : http://www.debian-administration.org/users/fsateler/weblog/4

Friday, 4 June 2010

Weird vboxsf apache issue

This is the weirdest thing I've seen in a long time. I have a debian lenny virtual machine running apache on my mac. Now here's the weird bit, the apache document root is on my mac via a vboxsf mount. If I view a static file, edit the file then refresh, the file corrupts, the only way to fix it is to unmount/remount the vboxsf share...now here's what's odder, this only happens with apache, it doesn't happen on cherokee, but restarting apache doesn't fix it..so it's hard to pinpoint the issue.

SUCCESS!

After testing on a windows xp host and deciding I'm not going mad, I did some more googling and found this http://forum.virtualbox.org/viewtopic.php?f=3&t=1940&start=0 which leads to this http://httpd.apache.org/docs/2.0/faq/error.html#error.sendfile

How do I fix my problem? Simple add

EnableSendfile Off

In my httpd.conf

That simple..don't you hate it when you spend hours and the solution is a one liner...bah :P

Quickly quit mac apps

http://osxdaily.com/2010/06/04/quickly-quit-programs-using-the-application-switcher/

cool!

Wednesday, 2 June 2010

Virtualbox shared host folders fstab

The fstab entry for a virtualbox host shared folder is

       vboxsf   rw   0   0

i.e.

projects    /host    vboxsf   rw    0    0

Virtualbox vboxaddtions and debian

This is a reminder to myself the package required to install vboxadditions is build-essential and linux-headers-`uname -r`

Tuesday, 1 June 2010

MySQL auto increment and rollbacks

If you insert a row into a MySQL table that has a auto increment value and then roll it back so it doesn't get added the auto increment value still goes up. (Makes sense really but you might not think of it)