installing trac

Installing the trac (http://trac.edgewall.org/) project to manage bugs and possibly even features/specifications for your projects. First install the trac dependencies

apt-get install python python-central python-setuptools 
python-pysqlite2 python-subversion libjs-jquery python-genshi 
python-tz python-pygments

use easy_install to install the latest version of trac (we had issues with the apt-get version and attachments)

easy_install -n http://svn.edgewall.org/repos/trac/tags/trac-0.11.4

create the directories that will contain our trac project files

mkdir /opt/trac 
mkdir -p /opt/trac/.trac-base/egg-cache 
cd /opt/trac

create the trac project

trac-admin trac-example initenv

create a password file and setup initial users

htpasswd /opt/htpasswd

make sure apache owns the trac directories

chown -R www-data:www-data /opt/trac

configure apache to handle trac as the root site

vim /opt/apache2/sites-enabled/trac

<VirtualHost *:80>
        Alias /trac/ /usr/share/trac/htdocs 
 
        ErrorLog /var/log/apache2/error.trac.log 
        CustomLog /var/log/apache2/access.trac.log combined 
 
         <Location "/">
                SetHandler mod_python 
                PythonInterpreter main_interpreter 
                PythonHandler trac.web.modpython_frontend 
                PythonOption TracEnvParentDir /opt/trac/ 
                PythonOption TracUriRoot / 
                PythonOption PYTHON_EGG_CACHE /opt/trac/.trac-base/egg-cache 
         </Location>

        # use the following for one authorization for all projects 
        # (names containing "-" are not detected): 
         <Location "/">
            AuthType Basic 
            AuthName "trac" 
            AuthUserFile /opt/htpasswd 
            Require valid-user 

        </Location>

</VirtualHost>

restart apache

/etc/init.d/apache2 restart

check the system with your browser by navigating to http://localhost/

 

keyboard and mouse sharing with synergy

So I don't have a dedicated keyboard for my mythtv and I hate to connect one for those little maintenance operations, one solution is to use http://synergy2.sourceforge.net/. Heres how I set it up on my dell mini9 and mythtv server;

install synergy on both systems:

sudo apt-get install synergy

edit the host file and ensure both computers can find each other: 

sudo vim /etc/hosts 

on the laptop something like this:

xxx.xxx.xxx.xxx myth

and on the mythtv server something like this: 

xxx.xxx.xxx.xxx mini9 

create a synergy configuration file on the laptop: 

sudo vim /etc/synergy.config 

section: screens
 mini9:
 myth:
end
section: links
 mini9:
  right = myth
 myth:
  left = mini9
end

start the server on the laptop (-f keeps the server in the foreground for logging/testing purposes):

synergys -f

now start the client end on the mythtv system (also in foreground mode):

synergyc -f mini9

make sure the 2 systems can communicate and that the mouse pointer can move from one system to the other. Set the synergy client to start when the mythtv user logs in: 

go to system -> preferences -> sessions in X and add a new command to run on login:

synergyc mini9

restart the mythtv server and make sure everything starts up correctly, now when you need to access your mythtv system using a mouse and keyboard you can do so from the comfort of your couch my starting the "synergys" server on your laptop.

chart for choosing charts

nobody loves poor ie6

regular expression cheat sheet

This cheat sheet was downloaded from http://www.addedbytes.com/cheat-sheets/regular-expressions-cheat-sheet/ and is an absolute gem, a must for any developers desk

(download)

replicating a subversion repository with svnsync

svnsync can be used to synchronize a remote subversion repository into a local one, this can be useful as a backup mechanism or to allow a trac (http://trac.edgewall.org/) instance to access subversion when it is impractical to host both on the same computer.

Create the new subversion repository and initialize it
svnadmin create svn.example.com

Create the pre-revprop-change hook script required by svnsync

Initialize the repository 
svnsync init file://$PWD/svn.example.com https://svn.example.com/

Resynchronize the repository with the master
svnsync sync file://$PWD/svn.example.com

Setup crontab to perform this operation every 5 minutes
crontab -e
*/5 * * * * /usr/bin/svnsync sync --non-interactive file:///opt/svn.example.com

NOTE: svnsync creates a lock property and if it fails for some reason this lock will prevent any further synchronizations, to remove it use the following
svn proplist --revprop -r 0 file:///opt/svn.example.com/
svn propdel svn:sync-lock --revprop -r 0  file:///opt/svn.example.com/

running appengine on kubuntu 9

I finally got Google appengine running on my Dell mini9 and heres how ...

Download and upzip the appengine stk

unzip google_appengine_1.2.2.zip

appengine does not run on python 2.6 (the kubuntu default version) so install 2.5 from the commandline

sudo apt-get install python2.5

edit the first line of the dev_appserver.py file in the google_appengine sdk folder

#!/usr/bin/env python

to read

#!/usr/bin/env python2.5

Now that's out of the way we have to fix the permissions on the files in the SDK:

cd google_appengine
sudo chmod -R o+rx ./*

All done, enjoy

setting Bing as your default Safari search engine

Download Glaims (http://www.macupdate.com/info.php/id/27708/glims) 

Quit Safari
 
Run the Glaims installer
 
Restart Safari
 
Open the Safari preferences and click the "Glims", click "Search Engines" and "add" a new entry
 
Name it "Bing" and enter the Query URL "http://www.bing.com/search?q=#query#"
 
Click Add/Set

Close Safari preferences
 
Change the search engine in Safari by clicking on Google icon in the search box and select Bing
 
Enjoy!