<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-2320564026961265250</id><updated>2012-02-17T00:34:11.534+11:00</updated><category term='drupal'/><category term='ubuntu'/><category term='netbeans'/><category term='svn'/><title type='text'>/* undefined */</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>11</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-8463058364991843147</id><published>2011-02-10T10:47:00.000+11:00</published><updated>2011-02-10T10:47:13.086+11:00</updated><title type='text'>Preserving file encoding when editing svn dump files</title><content type='html'>Some text editors may automatically alter the encoding of svn dump files if you ever have to manually edit them. Make sure that you always preserve the original encoding of the dump file, otherwise checksums will be off when you eventually try to import the file. Using nano, for example, launch with the -N option... nano -N myfile.dmp&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-8463058364991843147?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/8463058364991843147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2011/02/preserving-file-encoding-when-editing.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/8463058364991843147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/8463058364991843147'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2011/02/preserving-file-encoding-when-editing.html' title='Preserving file encoding when editing svn dump files'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-4423005166136522168</id><published>2011-02-09T15:41:00.004+11:00</published><updated>2012-02-04T13:33:37.261+11:00</updated><title type='text'>A simple model base using jquery events</title><content type='html'>&lt;pre class="brush:java"&gt;&lt;br /&gt;/**&lt;br /&gt; * Base class for all models in the app&lt;br /&gt; * &lt;br /&gt; * @author  Brendan McMahon brendan.mcmahon@publicisdigital.com&lt;br /&gt; * @version $Id$&lt;br /&gt; */&lt;br /&gt;var PMQuizModelBase = function() {&lt;br /&gt;  /**&lt;br /&gt;   * An element used for binding and triggering jquery events&lt;br /&gt;   */&lt;br /&gt;  var _element = $('&amp;lt;div/&amp;gt;');&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * Attributes/properties of our model&lt;br /&gt;   */&lt;br /&gt;  var _attributes = {};&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * Create and return the instance&lt;br /&gt;   */&lt;br /&gt;  var that = {&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Proxy for the jQuery trigger method&lt;br /&gt;     *&lt;br /&gt;     * @param {string} eventType&lt;br /&gt;     * @param {array} extraParameters&lt;br /&gt;     */&lt;br /&gt;    trigger: function(eventType, extraParameters) {&lt;br /&gt;      _element.trigger(eventType, extraParameters);&lt;br /&gt;    },&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Proxy for the jQuery bind method&lt;br /&gt;     *&lt;br /&gt;     * @param {string} eventType&lt;br /&gt;     * @param {object} eventData&lt;br /&gt;     * @param {function} handler&lt;br /&gt;     */&lt;br /&gt;    bind: function(eventType, eventData, handler) {&lt;br /&gt;      _element.bind(eventType, eventData, handler);&lt;br /&gt;    },&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Get an attribute&lt;br /&gt;     *&lt;br /&gt;     * @param {string} attribute&lt;br /&gt;     *  The name of the attribute to retrieve&lt;br /&gt;     *&lt;br /&gt;     * @return the value of the attribute&lt;br /&gt;     */&lt;br /&gt;    get: function(attribute) {&lt;br /&gt;      return _attributes[attribute];&lt;br /&gt;    },&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Set an attribute&lt;br /&gt;     *&lt;br /&gt;     * @param {string} attribute&lt;br /&gt;     *  The name of the attribute to set&lt;br /&gt;     * @param {object} value&lt;br /&gt;     *  The new value for the object&lt;br /&gt;     * @param {boolean} forceChange&lt;br /&gt;     *  If true, a "model:change" event will be triggered, even if the attribute&lt;br /&gt;     *  value has not changed&lt;br /&gt;     *&lt;br /&gt;     * @return {PMQuizModelBase} The model instance. Useful for method chaining&lt;br /&gt;     */&lt;br /&gt;    set: function(attribute, value, forceChange) {&lt;br /&gt;      var oldValue = _attributes[attribute];&lt;br /&gt;&lt;br /&gt;      _attributes[attribute] = value;&lt;br /&gt;&lt;br /&gt;      if (oldValue != value || forceChange) {&lt;br /&gt;        this.trigger('model:change', [attribute, oldValue, value]);&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      return this;&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  return that;&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-4423005166136522168?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/4423005166136522168/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2011/02/simple-model-base-using-jquery-events.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4423005166136522168'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4423005166136522168'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2011/02/simple-model-base-using-jquery-events.html' title='A simple model base using jquery events'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-4145507923443010900</id><published>2011-01-06T16:24:00.000+11:00</published><updated>2011-01-06T16:24:27.381+11:00</updated><title type='text'>Subversive on eclipse helios</title><content type='html'>Ignore the hype... Just install the older versions from these update sites&lt;br /&gt;&lt;br /&gt;http://download.eclipse.org/technology/subversive/0.7/update-site/&lt;br /&gt;http://community.polarion.com/projects/subversive/download/eclipse/2.0/update-site/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-4145507923443010900?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/4145507923443010900/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2011/01/subversive-on-eclipse-helios.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4145507923443010900'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4145507923443010900'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2011/01/subversive-on-eclipse-helios.html' title='Subversive on eclipse helios'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-4608661770254117098</id><published>2010-10-14T21:19:00.001+11:00</published><updated>2010-10-14T21:21:07.994+11:00</updated><title type='text'>lftp or rsync recipes simple site deployments</title><content type='html'>Choose your poison. Rsync over ssh looks like this. In rsync.sh&lt;br /&gt;&lt;pre&gt;#!/bin/sh&lt;br /&gt;rsync -ravz --delete -e ssh localdir user@server.com:/remote/path&lt;/pre&gt;In lftp.sh:&lt;br /&gt;&lt;pre&gt;#!/bin/bash    &lt;br /&gt;HOST="server.com"&lt;br /&gt;USER="user"&lt;br /&gt;PASS="pass"&lt;br /&gt;LCD="../local/path"&lt;br /&gt;RCD="/remote/path"&lt;br /&gt;lftp -c "set ftp:list-options -a;&lt;br /&gt;open sftp://$USER:$PASS@$HOST;&lt;br /&gt;lcd $LCD;&lt;br /&gt;cd $RCD;&lt;br /&gt;mirror --reverse \&lt;br /&gt;       --delete \&lt;br /&gt;       --verbose \&lt;br /&gt;       --parallel=8 \&lt;br /&gt;       --exclude-glob .svn/"&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-4608661770254117098?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/4608661770254117098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/10/lftp-or-rsync-recipes-simple-site.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4608661770254117098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4608661770254117098'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/10/lftp-or-rsync-recipes-simple-site.html' title='lftp or rsync recipes simple site deployments'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-5558060844924138189</id><published>2010-10-13T22:25:00.001+11:00</published><updated>2010-10-13T22:26:21.987+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='netbeans'/><title type='text'>Custom author name in netbeans templates</title><content type='html'>Netbeans uses the user.name java system var as the value of the ${user} token in code templates. The value can easily be set when netbeans launches by adding the following to the command used to launch netbeans:&lt;br /&gt;&lt;pre&gt;-J-Duser.name="Super Awesome Dude (superawesome[at]dude.com)"&lt;/pre&gt;So the full command would look something like this:&lt;br /&gt;&lt;pre&gt;/path/to/netbeans-6.9.1/bin/netbeans -J-Duser.name="Super Awesome Dude (superawesome[at]dude.com)"&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-5558060844924138189?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/5558060844924138189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/10/custom-author-name-in-netbeans.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/5558060844924138189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/5558060844924138189'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/10/custom-author-name-in-netbeans.html' title='Custom author name in netbeans templates'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-4889237315255769623</id><published>2010-05-17T11:09:00.001+10:00</published><updated>2010-05-17T11:09:08.326+10:00</updated><title type='text'>Backup with Amazon S3</title><content type='html'>Awesome stuff http://blog.eberly.org/2008/10/27/how-i-automated-my-backups-to-amazon-s3-using-rsync/&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-4889237315255769623?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/4889237315255769623/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/05/backup-with-amazon-s3.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4889237315255769623'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4889237315255769623'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/05/backup-with-amazon-s3.html' title='Backup with Amazon S3'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-4470898338041972240</id><published>2010-05-16T21:02:00.000+10:00</published><updated>2010-05-18T23:42:48.328+10:00</updated><title type='text'>Home network backup with rsync and ssh under Ubuntu</title><content type='html'>Generate ssh key pair. We'll create a passphraseless pair for the backup, so we don't need to supply the passphrase when executing the script as root. Generate a keypair on the client. Save it to some unique name, like backup-key&lt;br /&gt;&lt;pre class="brush: shell"&gt;$ ssh-keygen -t dsa -b 2048 -f /home/user/.ssh/backup-key&lt;br /&gt;Generating public/private dsa key pair.&lt;br /&gt;Enter passphrase (empty for no passphrase): [press enter here]&lt;br /&gt;Enter same passphrase again: [press enter here]&lt;br /&gt;Your identification has been saved in /home/user/.ssh/backup-key.&lt;br /&gt;Your public key has been saved in /home/user/.ssh/backup-key.pub.&lt;br /&gt;The key fingerprint is:&lt;br /&gt;2e:28:d9:ec:85:21:e7:ff:73:df:2e:07:78:f0:d0:a0 user@host &lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;Copy the public key up to the server.&lt;br /&gt;&lt;pre class="brush: shell"&gt;scp /home/user/.ssh/backup-key.pub serverusername@server:./backup-key.pub&lt;br /&gt;&lt;/pre&gt;Now ssh over to the server and add your public key...&lt;br /&gt;&lt;pre class="brush: shell"&gt;username@server:~$ cd .ssh&lt;br /&gt;serverusername@server:~$ touch authorized_keys2&lt;br /&gt;serverusername@server:~$ chmod 600 authorized_keys2&lt;br /&gt;serverusername@server:~$ cat ../backup-key.pub &gt;&gt; authorized_keys2&lt;br /&gt;serverusername@server:~$ rm ../backup-key.pub&lt;br /&gt;&lt;/pre&gt;Create the following shell script on each client. Ideally stick this in Anacrons /etc/cron.daily folder to have it run once per day.&lt;br /&gt;&lt;pre class="brush: php"&gt;#!/bin/sh&lt;br /&gt;&lt;br /&gt;# This script does backups of foo to the backup server bar&lt;br /&gt;# in a 7 day rotating incremental backup.&lt;br /&gt;# Based on script by Andrew Tridgell&lt;br /&gt;&lt;br /&gt;# directory to backup&lt;br /&gt;BDIR=/path/to/backup&lt;br /&gt;&lt;br /&gt;# Remote directory on backup server&lt;br /&gt;BACKUP_HOME=/backups&lt;br /&gt;&lt;br /&gt;# Backup login account on remote server&lt;br /&gt;BACKUP_LOGIN=user&lt;br /&gt;&lt;br /&gt;# the name of the backup server&lt;br /&gt;BSERVER=ubuntu-server&lt;br /&gt;BACKUPDIR=`date +%A`&lt;br /&gt;&lt;br /&gt;export PATH=$PATH:/bin:/usr/bin:/usr/local/bin&lt;br /&gt;&lt;br /&gt;# Dump output to backup file&lt;br /&gt;date &gt; /var/log/backup.$BACKUPDIR.log&lt;br /&gt;&lt;br /&gt;# the following line clears the last week's incremental directory&lt;br /&gt;[ -d /tmp/emptydir ] || mkdir /tmp/emptydir&lt;br /&gt;rsync -e "ssh -i /home/user/.ssh/backup-key" --delete -a /tmp/emptydir/ $BACKUP_LOGIN@$BSERVER:$BACKUP_HOME/$BACKUPDIR/&lt;br /&gt;rmdir /tmp/emptydir&lt;br /&gt;&lt;br /&gt;# now the actual transfer&lt;br /&gt;rsync -r -e "ssh -i /home/user/.ssh/backup-key" --force --ignore-errors --delete --backup --backup-dir=$BACKUP_HOME/$BACKUPDIR -av $BDIR $BACKUP_LOGIN@$BSERVER:$BACKUP_HOME/current &gt;&gt; /var/log/backup.$BACKUPDIR.log&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-4470898338041972240?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/4470898338041972240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/05/home-network-backup-with-rsync-and-ssh.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4470898338041972240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4470898338041972240'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/05/home-network-backup-with-rsync-and-ssh.html' title='Home network backup with rsync and ssh under Ubuntu'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-8561905432103772222</id><published>2010-05-10T17:16:00.000+10:00</published><updated>2010-05-16T21:22:34.959+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Install RabbitCVS under Ubuntu Jaunty (9.04)</title><content type='html'>RabbitCVS is like Tortoise SVN for Win. Add sources to /etc/apt/sources.list&lt;br /&gt;&lt;pre class="brush: shell"&gt;deb http://ppa.launchpad.net/rabbitvcs/ppa/ubuntu jaunty main &lt;/pre&gt;Then grab keys with&lt;br /&gt;&lt;pre class="brush: shell"&gt;sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 34EF4A35&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-8561905432103772222?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/8561905432103772222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/05/install-rabbitcvs-under-ubuntu-jaunty.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/8561905432103772222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/8561905432103772222'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/05/install-rabbitcvs-under-ubuntu-jaunty.html' title='Install RabbitCVS under Ubuntu Jaunty (9.04)'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-4244317813838510485</id><published>2010-05-10T16:58:00.000+10:00</published><updated>2010-05-16T21:22:40.689+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ubuntu'/><category scheme='http://www.blogger.com/atom/ns#' term='svn'/><title type='text'>Updating SVN under Ubuntu Jaunty (9.04)</title><content type='html'>Packaged version of SVN client is suck back at 1.5.4. Add the following to /etc/apt/sources.list&lt;br /&gt;&lt;pre class="brush: shell"&gt;deb http://ppa.launchpad.net/anders-kaseorg/subversion-1.6/ubuntu jaunty main &lt;br /&gt;deb-src http://ppa.launchpad.net/anders-kaseorg/subversion-1.6/ubuntu jaunty main&lt;br /&gt;&lt;/pre&gt;Then grab keys with&lt;br /&gt;&lt;pre class="brush: shell"&gt;sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 413576CB&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-4244317813838510485?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/4244317813838510485/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/05/updating-svn-under-ubuntu-jaunty-904.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4244317813838510485'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4244317813838510485'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/05/updating-svn-under-ubuntu-jaunty-904.html' title='Updating SVN under Ubuntu Jaunty (9.04)'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-4308471104039552762</id><published>2010-04-06T11:39:00.001+10:00</published><updated>2011-02-09T15:42:00.341+11:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='drupal'/><title type='text'>Programmatically creating CCK content types</title><content type='html'>Usually do this from a module install hook. &lt;br /&gt;First create content types in Drupal, then export them. Save the exported ctypes (php source) in inc files in your module. Then use the following source...&lt;br /&gt;&lt;pre class="brush:php"&gt;function mymodule_install() {&lt;br /&gt; _install_content_types(array('type_1.ctype', 'type_2.ctype'));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function mymodule_uninstall() {&lt;br /&gt; _uninstall_content_types(array('type_1.ctype', 'type_2.ctype'));&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * based on http://www.tinpixel.com/node/53&lt;br /&gt; *&lt;br /&gt; * $content_types should be a list of filenames in this dir containing content &lt;br /&gt; * type exports.&lt;br /&gt; */&lt;br /&gt;function _install_content_types($content_types=array()){&lt;br /&gt;&lt;br /&gt; foreach($content_types as $content_type){&lt;br /&gt;  &lt;br /&gt;  // content variable is defined by the include below&lt;br /&gt;  $content = '';&lt;br /&gt;  &lt;br /&gt;  require_once $content_type;&lt;br /&gt;  &lt;br /&gt;  // CCK content_copy.module may not be enabled, so make sure it is included&lt;br /&gt;  require_once './' . drupal_get_path('module', 'content') . '/modules/content_copy/content_copy.module';&lt;br /&gt;&lt;br /&gt;  node_type_delete($content['type']['type']);&lt;br /&gt;  &lt;br /&gt;  $form_state['values']['type_name'] = '&lt;create&gt;';&lt;br /&gt;  $form_state['values']['macro'] = '$content = ' . var_export($content, TRUE) . ';';&lt;br /&gt;&lt;br /&gt;  // form provided by content_copy.module  &lt;br /&gt;  drupal_execute('content_copy_import_form', $form_state);&lt;br /&gt;  content_clear_type_cache();&lt;br /&gt; } &lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function _uninstall_content_types($content_types=array()){&lt;br /&gt;&lt;br /&gt; foreach($content_types as $content_type){&lt;br /&gt;  &lt;br /&gt;  // content variable is defined by the include below&lt;br /&gt;  $content = '';&lt;br /&gt;  &lt;br /&gt;  require_once $content_type;&lt;br /&gt;  &lt;br /&gt;  // CCK content_copy.module may not be enabled, so make sure it is included&lt;br /&gt;  require_once './' . drupal_get_path('module', 'content') . '/modules/content_copy/content_copy.module';&lt;br /&gt;&lt;br /&gt;  node_type_delete($content['type']['type']);&lt;br /&gt;  &lt;br /&gt;  content_clear_type_cache();&lt;br /&gt; } &lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-4308471104039552762?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/4308471104039552762/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/04/programmatically-creating-cck-content.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4308471104039552762'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/4308471104039552762'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/04/programmatically-creating-cck-content.html' title='Programmatically creating CCK content types'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-2320564026961265250.post-3739402127869883774</id><published>2010-04-06T11:17:00.000+10:00</published><updated>2010-04-06T11:18:51.714+10:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='drupal'/><title type='text'>Programmatically creating imagecache presets</title><content type='html'>Usually do this from a module install hook&lt;br /&gt;&lt;pre class="brush: php"&gt;function mymodule_install() {&lt;br /&gt;  // Create imagecache preset&lt;br /&gt;  $imagecachepreset = imagecache_preset_save(array('presetname' =&gt; 'mypreset'));&lt;br /&gt;  &lt;br /&gt;  // Create imagecache action&lt;br /&gt;  $imagecacheaction = new stdClass ();&lt;br /&gt;  $imagecacheaction-&gt;presetid = $imagecachepreset['presetid'];&lt;br /&gt;  $imagecacheaction-&gt;module = 'imagecache';&lt;br /&gt;  $imagecacheaction-&gt;action = 'imagecache_scale_and_crop';&lt;br /&gt;  $imagecacheaction-&gt;data = array('width' =&gt; '100', 'height' =&gt; '75' );&lt;br /&gt;  &lt;br /&gt;  // Save imagecache action to the db&lt;br /&gt;  drupal_write_record('imagecache_action', $imagecacheaction);&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/2320564026961265250-3739402127869883774?l=blog.undefined.com.au' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://blog.undefined.com.au/feeds/3739402127869883774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://blog.undefined.com.au/2010/04/programmatically-creating-imagecache.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/3739402127869883774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/2320564026961265250/posts/default/3739402127869883774'/><link rel='alternate' type='text/html' href='http://blog.undefined.com.au/2010/04/programmatically-creating-imagecache.html' title='Programmatically creating imagecache presets'/><author><name>Brendan McMahon</name><uri>https://profiles.google.com/102101914656807069939</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='//lh6.googleusercontent.com/-vLWOJ7nOeMc/AAAAAAAAAAI/AAAAAAAAAAA/cuwJiVHrIDw/s512-c/photo.jpg'/></author><thr:total>0</thr:total></entry></feed>
