June 23rd, 2009
Following their instructions to initialise the database, you get a complaing about /dev/null.
This is because the default postgres user is installed with a shell of /dev/null.
To change it, forget all the Unix stuff you know about administering users and do this
sudo dscl . -change /Users/postgres UserShell /dev/null /bin/sh
Or if you want to check first, check that the user exists
sudo dscl . -list /Users UniqueID
And then check the postgres user
sudo dscl . read /users/postgres
Posted in postgres, osx | No Comments »
June 11th, 2009
Needed to do this:
sudo locale-gen en_GB.UTF-8
sudo dpkg-reconfigure locales
Posted in ubuntu | No Comments »
June 9th, 2009
sudo apt-get install update-manager-core
sudo do-release-upgrade
Posted in ubuntu | No Comments »
May 29th, 2009
There’s a bug in (at least some versions of) Ubuntu, which means the wrong library is being picked up.
https://bugs.launchpad.net/ubuntu/+source/subversion/+bug/294648
Workaround: LD_PRELOAD=/usr/lib/libneon.so.27 svn
Posted in openssl, svn, crypto, ubuntu | No Comments »
May 8th, 2009
if for example, you want to apply a unique index, but you can’t because there’s duplicates in the table.
SELECT name FROM mytable GROUP BY name HAVING COUNT(*) > 1;
Posted in postgres | No Comments »
May 1st, 2009
Posted in my websites | No Comments »
May 1st, 2009
svn propset svn:executable on
Posted in svn | No Comments »
January 8th, 2009
rngd -f -r /dev/urandom
This sends the output from the fast-but-not-very-random PRNG as input into /dev/random. Useful when testing and speed is more important than security.
Posted in crypto | No Comments »
December 18th, 2008
I needed to get at the request in a template which had been called ‘direct_to_template’. To make the request available, you need to modify the TEMPLATE_CONTEXT_PROCESSORS variable.
Add this to your settings file
TEMPLATE_CONTEXT_PROCESSORS = (
'django.core.context_processors.request',
)
Then you can use {{ request }}
Posted in django | 5 Comments »
December 11th, 2008
It seems that browser refuse to install cookies for a TLD. So for example, if your local network is .internal, then you won’t be able to set a domain in a cookie for .internal. Add another layer into the domain e.g. .level2.internal, and the cookie will work fine.
Posted in www | No Comments »