<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Brooke Bryan - Make Life Easy, Automate Everything</title>
	<atom:link href="http://www.bajb.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bajb.net</link>
	<description>Just Develop It</description>
	<lastBuildDate>Fri, 03 Feb 2012 01:21:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Cassandra Service Script</title>
		<link>http://www.bajb.net/2012/01/cassandra-service-script/</link>
		<comments>http://www.bajb.net/2012/01/cassandra-service-script/#comments</comments>
		<pubDate>Tue, 31 Jan 2012 10:16:15 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Just Develop It]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=179</guid>
		<description><![CDATA[Without an existing cassandra service script, I decided to go ahead and create one, to make things a little easier to manage, and to make the whole experience a little more user friendly The script includes a few nodetool basics, such as repair, cleanup, info, netstats etc. And will log the start and end times [...]]]></description>
			<content:encoded><![CDATA[<p>Without an existing cassandra service script, I decided to go ahead and create one, to make things a little easier to manage, and to make the whole experience a little more user friendly <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The script includes a few nodetool basics, such as repair, cleanup, info, netstats etc. And will log the start and end times in its own log for repair and cleanup, allowing you to see how long the process takes without having the trawl through all the cassandra logs to find a start and end time (very useful for us when it takes over 5 hours to complete a repair).</p>
<p>Here is the script, simply copy the content into /etc/init.d/cassandra and make it executable <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre>#!/bin/bash
#
# Author: Brooke Bryan
#
#
# Description:	Cassandra Server.
# Processname: cassandra
# Config: /usr/local/share/cassandra/conf/cassandra.yaml

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

prog="Cassandra"
pidfile="/var/run/cassandra.pid"
progbin="/usr/local/share/cassandra/bin"
lock="/var/lock/subsys/cassandra"
logfile="/var/log/cassandra/service.log"

WriteLog()
{
    echo "`date`: $@" &gt;&gt; $logfile
}

LogInfo()
{
    echo "$@"
    WriteLog "INFO: $@"
}

LogWarning()
{
    echo "$@"
    WriteLog "WARNING: $@"
}

start()
{
    if [ -f $pidfile ] &amp;&amp; checkpid `cat $pidfile`; then
        action "$prog is already running." /bin/false
        exit 0
    fi

    WriteLog "Starting $prog"

    daemon "$progbin/cassandra" -p $pidfile &gt;&gt; $logfile 2&gt;&amp;1
    usleep 500000
    RETVAL=$?
    if [ $RETVAL -eq 0 ]; then
        touch "$lock"
        action "Starting $prog" /bin/true
    else
        action "Starting $prog" /bin/false
    fi

    WriteLog "Started $prog"

    return $RETVAL
}

stop()
{
    $progbin/nodetool -h localhost disablethrift
    $progbin/nodetool -h localhost disablegossip
    $progbin/nodetool -h localhost drain
    WriteLog "Stopping $prog"
    CASSIEPID=`cat "$pidfile"  2&gt;/dev/null `
    if [ -n "$CASSIEPID" ]; then
        /bin/kill "$CASSIEPID" &gt;/dev/null 2&gt;&amp;1
        ret=$?
        if [ $ret -eq 0 ]; then
            STOPTIMEOUT=60
            while [ $STOPTIMEOUT -gt 0 ]; do
                /bin/kill -0 "$CASSIEPID" &gt;/dev/null 2&gt;&amp;1 || break
                sleep 1
                let STOPTIMEOUT=${STOPTIMEOUT}-1
            done
            if [ $STOPTIMEOUT -eq 0 ]; then
                echo "Timeout error occurred trying to stop $prog Daemon"
                ret=1
                action $"Stopping $prog: " /bin/false
                LogInfo "Timeout error occurred trying to stop $prog Daemon pid($CASSIEPID)"
            else
                rm -f "$lock"
                action $"Stopping $prog: " /bin/true
                WriteLog "INFO: $prog Daemon Stopped pid($CASSIEPID)"
            fi
        else
            action $"Stopping $prog: " /bin/false
            WriteLog "WARNING: $prog Daemon Stop Failed pid($CASSIEPID)"
        fi
    else
        ret=1
        action $"Stopping $prog: " /bin/false
    fi
    return $ret
}

restart()
{
    LogInfo "Restart Initiated"
    stop
    start
}

ring()
{
    $progbin/nodetool -h localhost ring
}

info()
{
    $progbin/nodetool -h localhost info
}

netstats()
{
    $progbin/nodetool -h localhost netstats
}

repair()
{
    LogInfo "Starting Repair"
    $progbin/nodetool -h localhost repair
    LogInfo "Completed Repair"
}

cleanup()
{
    LogInfo "Starting Cleanup"
    $progbin/nodetool -h localhost cleanup
    LogInfo "Completed Cleanup"
}

version()
{
    $progbin/nodetool -h localhost version
}

# See how we were called.
case "$1" in
  start)
    start
    ;;
  stop)
    stop
    ;;
  status)
    status cassandra
    ;;
  restart)
    restart
    ;;
  ring)
    ring
    ;;
  info)
    info
    ;;
  netstats)
    netstats
    ;;
  repair)
    repair
    ;;
  cleanup)
    cleanup
    ;;
  version)
    version
    ;;
  *)
    echo $"Usage: $0 {start|stop|status|restart|ring|info|netstats|repair|cleanup|version}"
    exit 1
esac

exit $?</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2012%2F01%2Fcassandra-service-script%2F&amp;title=Cassandra%20Service%20Script" id="wpa2a_2">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2012/01/cassandra-service-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing cassandra on Centos 5</title>
		<link>http://www.bajb.net/2011/08/installing-cassandra-on-centos-5/</link>
		<comments>http://www.bajb.net/2011/08/installing-cassandra-on-centos-5/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 09:34:14 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[Cassandra]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Just Develop It]]></category>
		<category><![CDATA[cassandra]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[jna]]></category>
		<category><![CDATA[mx4j]]></category>
		<category><![CDATA[sun]]></category>
		<category><![CDATA[tokens]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=175</guid>
		<description><![CDATA[Just a quick post on how-to install cassandra on Centos 5, and getting the required bits on to stop all the errors you will see, such as JNA and MX4J missing. First you need to get all the required modules from yum, to prepare the server. yum -y install gcc-c++ make cmake python-devel bzip2-devel zlib-devel [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick post on how-to install cassandra on Centos 5, and getting the required bits on to stop all the errors you will see, such as JNA and MX4J missing.</p>
<p>First you need to get all the required modules from yum, to prepare the server.</p>
<p style="padding-left: 30px;">yum -y install gcc-c++ make cmake python-devel bzip2-devel zlib-devel<br />
yum -y install log4cpp-devel git git-core cronolog google-perftools-devel<br />
yum -y install readline-devel ncurses-devel libtool autoconf expat<br />
yum -y install libevent-devel flex byacc expat-devel</p>
<p style="padding-left: 30px;"># Perl Modules for Thrift Install<br />
yum -y install perl-Bit-Vector perl-Class-Accessor</p>
<p style="padding-left: 30px;"># Java Install<br />
yum -y remove jpackage-utils<br />
wget http://dev.centos.org/centos/5/testing/x86_64/RPMS/jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm<br />
rpm -ivh jpackage-utils-1.7.5-1jpp.1.el5.centos.noarch.rpm<br />
yum -y install xml-commons-apis xml-commons-apis-javadoc ant<br />
yum -y install java<br />
yum -y install log4j jakarta-commons-logging jakarta-commons-lang<br />
yum -y install java-1.4.2-gcj-compat java-1.4.2-gcj-compat-devel</p>
<p>Next you will want to download the latest version of cassandra available at <a title="Cassandra Download" href="http://cassandra.apache.org/download/" target="_blank">http://cassandra.apache.org/download/</a></p>
<p>I have chosen to install cassandra in the following location: /usr/local/share/cassandra</p>
<p style="padding-left: 30px;">wget http://mirror.ox.ac.uk/sites/rsync.apache.org//cassandra/0.8.4/apache-cassandra-0.8.4-bin.tar.gz<br />
tar -xvf apache-cassandra-0.8.4-bin.tar.gz<br />
mkdir /usr/local/share/cassandra/<br />
cp ~/apache-cassandra-0.8.4/* /usr/local/share/cassandra -R -f;<br />
cd /usr/local/share/cassandra</p>
<p>Installing JNA is done as follows:</p>
<p style="padding-left: 30px;">wget &#8220;https://github.com/twall/jna/raw/3.3.0/jnalib/dist/jna.jar&#8221; &#8211;no-check-certificate -O /usr/local/share/cassandra/lib/jna.jar<br />
chmod 755 /usr/local/share/cassandra/lib/jna.jar</p>
<p>MX4J is installed with:</p>
<p style="padding-left: 30px;">wget &#8220;http://downloads.sourceforge.net/project/mx4j/MX4J%20Binary/3.0.2/mx4j-3.0.2.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fmx4j%2Ffiles%2FMX4J%2520Binary%2F3.0.2%2F&amp;ts=1314263784&amp;use_mirror=freefr&#8221;<br />
tar zxvf mx4j-3.0.2.tar.gz mx4j-3.0.2/lib/mx4j-tools.jar<br />
cp mx4j-3.0.2/lib/mx4j-tools.jar /usr/local/share/cassandra/lib/<br />
chmod 755 /usr/local/share/cassandra/lib/mx4j-tools.jar</p>
<p>Switching to Sun Java<br />
You will need to download the latest JDK from SUN, and can switch from OpenJDK with the following</p>
<p style="padding-left: 30px;">rpm /root/jdk-7-linux-x64.rpm -ivh<br />
/usr/sbin/alternatives &#8211;install /usr/bin/java java /usr/java/jdk1.7.0/bin/java 2 &amp;&amp; /usr/sbin/alternatives &#8211;config java</p>
<p>Just enter the number of the new JDK in the selection above, and hit enter (on a fresh install, its usually #3)</p>
<p>Finishing up.<br />
After you have everything above done, you should just be able to edit the config file /usr/local/share/cassandra/conf/cassandra.yaml, and then run cassandra /usr/local/share/cassandra/bin/cassandra</p>
<p>If you are running a cluster setup with cassandra, you can use a token calculator such as http://blog.milford.io/cassandra-token-calculator/ which will evenly spread the data across your nodes.</p>
<p>Also be sure to set your commit log and data directory on different disks.</p>
<p>The best option I have found is having the commitlog and OS on an SSD drive, and the data stored on a Raid 0 disk array with SAS drives. You want to make sure you have at least double the space available on disk as what you will be consuming with your nodes.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2011%2F08%2Finstalling-cassandra-on-centos-5%2F&amp;title=Installing%20cassandra%20on%20Centos%205" id="wpa2a_4">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2011/08/installing-cassandra-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Excel Timestamp to Date</title>
		<link>http://www.bajb.net/2010/05/excel-timestamp-to-date/</link>
		<comments>http://www.bajb.net/2010/05/excel-timestamp-to-date/#comments</comments>
		<pubDate>Tue, 25 May 2010 19:23:48 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[data]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[Excel]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timestamp]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=164</guid>
		<description><![CDATA[Today, I had the problem of converting a timestamp to a readable time format inside excel.  Not quite as easy as I would have hoped for, but the solution is fairly painless. In the excel column you wish to display the date, you need to place the following formula. =(((COLUMN_ID_HERE/60)/60)/24)+DATE(1970,1,1) You would then need to [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I had the problem of converting a timestamp to a readable time format inside excel.  Not quite as easy as I would have hoped for, but the solution is fairly painless.</p>
<p>In the excel column you wish to display the date, you need to place the following formula.</p>
<p><code>=(((COLUMN_ID_HERE/60)/60)/24)+DATE(1970,1,1)</code></p>
<p>You would then need to replace COLUMN_ID_HERE with the cell that holds the timestamp.  e.g. A1</p>
<p>The above formula can be simplified, but I think the above explains a little more what is actually being done to the data <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>You would then need to format the cell to be dd/mm/yyyy hh:mm and you are done <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2010%2F05%2Fexcel-timestamp-to-date%2F&amp;title=Excel%20Timestamp%20to%20Date" id="wpa2a_6">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2010/05/excel-timestamp-to-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Sky Box Hiddden Secrets</title>
		<link>http://www.bajb.net/2010/05/sky-box-hiddden-secrets/</link>
		<comments>http://www.bajb.net/2010/05/sky-box-hiddden-secrets/#comments</comments>
		<pubDate>Sat, 01 May 2010 14:56:01 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[BSkyB]]></category>
		<category><![CDATA[engineers]]></category>
		<category><![CDATA[hidden]]></category>
		<category><![CDATA[installers]]></category>
		<category><![CDATA[sky]]></category>
		<category><![CDATA[upgrade]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=162</guid>
		<description><![CDATA[Over the past few days I have been playing about with my Sky Boxes at home, and found a few hidden secrets around. This post is just to combine the bits I have found. Forcing An Upgrade After a few months of having a HD box still running on the old EPG (electronic program guide) [...]]]></description>
			<content:encoded><![CDATA[<p>Over the past few days I have been playing about with my Sky Boxes at home, and found a few hidden secrets around.  This post is just to combine the bits I have found.</p>
<p><strong>Forcing An Upgrade</strong></p>
<p><strong></strong>After a few months of having a HD box still running on the old EPG (electronic program guide) , I decided to find a way to force the system to update to the latest version.</p>
<p>You can do this by:</p>
<p>Power off the box at mains<br />
Hold down back up buttom on front of box<br />
Power back on at mains<br />
When download message appears on screen, let go of back up button.</p>
<p>This will usually take around 10 minutes, but once the box comes back, you should have the latest software for your box <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Sky Installers Menu</strong><br />
The Sky installers menu allows you to change extra settings on your Sky box, but be careful, changing settings in here can cause your box to stop working.</p>
<p>On the original sky epg, you can access this menu by pressing the following keys on your sky remote in order.</p>
<p>SERVICES<br />
4<br />
0<br />
1<br />
SELECT</p>
<p>More information can be found about the options here: <a href="http://www.digitalsat.co.uk/skyinstallersmenu.html" target="_blank">http://www.digitalsat.co.uk/skyinstallersmenu.html</a></p>
<p>To access the menu on a sky HD box, you need to press the following keys in order:</p>
<p>SERVICES<br />
0<br />
0<br />
1<br />
SELECT</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2010%2F05%2Fsky-box-hiddden-secrets%2F&amp;title=Sky%20Box%20Hiddden%20Secrets" id="wpa2a_8">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2010/05/sky-box-hiddden-secrets/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Opera 10.50 JavaScript Engine Super Speedy</title>
		<link>http://www.bajb.net/2010/03/opera-10-50-javascript-engine-super-speedy/</link>
		<comments>http://www.bajb.net/2010/03/opera-10-50-javascript-engine-super-speedy/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 12:24:06 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[ie]]></category>
		<category><![CDATA[internet explorer]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[speed]]></category>
		<category><![CDATA[test]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=156</guid>
		<description><![CDATA[So, I just downloaded the new Opera, and ran a JavaScript speed check, and was amazed how their new engines compare to the other browsers around.  It also supports Windows 7 taskbar highlights properly The test I ran was on http://www2.webkit.org/perf/sunspider-0.9/sunspider-driver.html and here are the results Opera 10.50 ============================================ RESULTS (means and 95% confidence intervals) &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>So, I just downloaded the new Opera, and ran a JavaScript speed check, and was amazed how their new engines compare to the other browsers around.  It also supports Windows 7 taskbar highlights properly <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The test I ran was on <a title="JavaScript Speed Test" href="http://www2.webkit.org/perf/sunspider-0.9/sunspider-driver.html" target="_blank">http://www2.webkit.org/perf/sunspider-0.9/sunspider-driver.html</a> and here are the results</p>
<p>Opera 10.50<br />
============================================<br />
RESULTS (means and 95% confidence intervals)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Total:                  388.6ms +/- 2.3%<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Chrome 4.0.249<br />
============================================<br />
RESULTS (means and 95% confidence intervals)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Total:                  556.2ms +/- 3.1%<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Firefox 3.5.8<br />
============================================<br />
RESULTS (means and 95% confidence intervals)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Total:                 1155.4ms +/- 1.6%<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p>Internet Explorer 8<br />
============================================<br />
RESULTS (means and 95% confidence intervals)<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Total:                  5145.4ms +/- 0.6%<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2010%2F03%2Fopera-10-50-javascript-engine-super-speedy%2F&amp;title=Opera%2010.50%20JavaScript%20Engine%20Super%20Speedy" id="wpa2a_10">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2010/03/opera-10-50-javascript-engine-super-speedy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Browser Back Button Detection</title>
		<link>http://www.bajb.net/2010/02/browser-back-button-detection/</link>
		<comments>http://www.bajb.net/2010/02/browser-back-button-detection/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 16:25:14 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[back button]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[detection]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[navigation]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=150</guid>
		<description><![CDATA[Update: (27th Jan 2011)  A fix for Chrome has now been uploaded. Ever since the web moved into the 2.0 generation, websites are increasingly using ajax to build up content, and navigate around without reloading the entire page. There is one major problem with this, and that is the browser. Until now, browsers to not [...]]]></description>
			<content:encoded><![CDATA[<p>Update: (27th Jan 2011)  A fix for Chrome has now been uploaded.</p>
<p>Ever since the web moved into the 2.0 generation, websites are increasingly using ajax to build up content, and navigate around without reloading the entire page.  There is one major problem with this, and that is the browser.  Until now, browsers to not trigger events for when the user is flipping between pages using the navigation buttons.  This has been a problem with flash sites for a much longer period of time, with the user clicking back in the browser expecting to see the previous page shown in flash, but instead, they are taken to the last site they were on.</p>
<p>When improving the functionality of our Automated Chat Software, <a onclick="window.open(this.href); return false;" href="http://www.intellichat.com">Intellichat</a>, we had many requests from customers asking for the chat window to not launch when the user clicked back in their browser.  After a lot of research into the problem, and how to detect it, I found the solution to be based around iFrames (as much as I hate them).  When the user clicks back on their browser, they will initially navigate back through the iframes on the page before main page can go back.</p>
<p>This solution works great in Firefox and IE, however Safari needs an alternative solution.  This is based around location hash tags (I find this solution quite messy, and easy to spot from the users point of view).  When the page first loads, you can set the window.location.hash to anything you want, and then simply check the window.location.hash variable every few milliseconds to see if it has changed.  Once it changes back to an empty value, you can see the user clicked back.</p>
<p><strong>The Solution</strong><br />
I have made a very reusable javascript class, that can be simply dropped into your web page, and when the user clicks back, it will call a function.  The default function on this call is a javascript alert &#8220;Back Button Clicked&#8221;.</p>
<p>To replace this functionality, you simply need to override the OnBack function.  This can be done by using the code below.</p>
<p><code>&lt;script type="text/javascript"&gt;<br />
bajb_backdetect.OnBack = function()<br />
{<br />
alert('You clicked it!');<br />
}<br />
&lt;/script&gt;</code></p>
<p>This will now replace the &#8220;Back Button Clicked&#8221; alert with a &#8220;You clicked it!&#8217;&#8221; alert.</p>
<p>You can see the code in action at <a onclick="window.open(this.href); return false;" href="http://www.brookebryan.com/code/backbutton/">http://www.brookebryan.com/code/backbutton/</a><br />
or you can download the source from: <a onclick="window.open(this.href); return false;" href="http://www.brookebryan.com/code/backbutton/BackDetect.zip">http://www.brookebryan.com/code/backbutton/BackDetect.zip</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2010%2F02%2Fbrowser-back-button-detection%2F&amp;title=Browser%20Back%20Button%20Detection" id="wpa2a_12">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2010/02/browser-back-button-detection/feed/</wfw:commentRss>
		<slash:comments>72</slash:comments>
		</item>
		<item>
		<title>Google Wave</title>
		<link>http://www.bajb.net/2009/07/google-wave/</link>
		<comments>http://www.bajb.net/2009/07/google-wave/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 16:36:16 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=136</guid>
		<description><![CDATA[About 20 minutes ago I got my invite to google wave. I now have my account live (brooke@wavesandbox.com) as well as my secondary account (brooke-test@wavesandbox.com), so I can start testing out the wave. I haven&#8217;t had any time to get into it and play, but here is a screenshot of an empty preview account Update: [...]]]></description>
			<content:encoded><![CDATA[<p>About 20 minutes ago I got my invite to google wave.  I now have my account live (brooke@wavesandbox.com) as well as my secondary account (brooke-test@wavesandbox.com), so I can start testing out the wave.  I haven&#8217;t had any time to get into it and play, but here is a screenshot of an empty preview account <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<div style="text-align:center;"><a href="http://www.bajb.net/wp-content/uploads/2009/07/wavestart.png" onclick="window.open(this.href); return false;"><img class="aligncenter size-medium wp-image-137" title="Google Wave Home Preview" src="http://www.bajb.net/wp-content/uploads/2009/07/wavestart-300x166.png" alt="Google Wave Home Preview" width="300" height="166" /></a></div>
<p><strong>Update:</strong><br />
After about 20 minutes, everyone started using wave and this is what it looks like</p>
<div style="text-align:center;"><a href="http://www.bajb.net/wp-content/uploads/2009/07/wavenext.png" onclick="window.open(this.href); return false;"><img src="http://www.bajb.net/wp-content/uploads/2009/07/wavenext-300x166.png" alt="Wave After 20 Minutes" title="Wave After 20 Minutes" width="300" height="166" class="aligncenter size-medium wp-image-141" /></a></div>
<p><strong>Update 2:</strong><br />
When I tried to reply to a wave that was created after I first loaded the page.</p>
<div style="text-align:center;"><a href="http://www.bajb.net/wp-content/uploads/2009/07/waverefresh.png" onclick="window.open(this.href); return false;"><img src="http://www.bajb.net/wp-content/uploads/2009/07/waverefresh-300x45.png" alt="Wave Requires Refresh" title="Wave Requires Refresh" width="300" height="45" class="aligncenter size-medium wp-image-144" /></a></div>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2009%2F07%2Fgoogle-wave%2F&amp;title=Google%20Wave" id="wpa2a_14">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2009/07/google-wave/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The Day Is Finally Here</title>
		<link>http://www.bajb.net/2009/06/the-day-is-finally-here/</link>
		<comments>http://www.bajb.net/2009/06/the-day-is-finally-here/#comments</comments>
		<pubDate>Thu, 11 Jun 2009 19:31:33 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[MacBook Pro]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=130</guid>
		<description><![CDATA[If you know me, you will know I hate Mac&#8217;s.  However, the day has finally arrived where I decided to take a risk and go to buy one for myself.  Not being a strong follower of the Apple movement, I purchased my MacBook Pro on sunday 7th June.  I got home, installed some apps (dragging [...]]]></description>
			<content:encoded><![CDATA[<p>If you know me, you will know I hate Mac&#8217;s.  However, the day has finally arrived where I decided to take a risk and go to buy one for myself.  Not being a strong follower of the Apple movement, I purchased my MacBook Pro on sunday 7th June.  I got home, installed some apps (dragging an icon around the screen seemed to be how you install an app), and started to get used to the interface.  All was great until the afternoon on Monday.  I had <a title="James Marshall" href="http://www.younggogetter.co.uk/" target="_blank">James</a>, the designer @ Just Develop It send me a text message telling me Apple dropped the price of the MacBook Range and also upgraded all of the hardware&#8230; Gutted.</p>
<p>I called the Apple Store straight away, and they said it would be fine to just bring it back and get a new one when it came in stock.  Yesterday it arrived at the store so I went down and exchanged my old MacBook Pro for a nice shiny new one.  They even gave me money back.  Money Back for an upgrade?  Are they mad.  I dont know how I have gone from hating apple, to loving them within the space of a week, and also now being the owner of my <strong>second</strong> apple.</p>
<p style="text-align: center;"><img class="size-full wp-image-131  aligncenter" title="MacBook Pro" src="http://www.bajb.net/wp-content/uploads/2009/06/macpro.png" alt="MacBook Pro" width="500" height="276" /></p>
<p>I have to admit, Apple products are Very well designed, even the packaging is amazing.  I hope that my previous view on Mac Users was wrong, because I dont want to trade productivity for a good looking laptop.  Setup was fairly painless with nearly everything being done for me, and I just had to go into the settings to tweak the system to act more like windows.  Working out all the short cut keys didnt take long (apart from Home &amp; End, which I later found to just be cmd + the arrow keys) .  I have enabled the &#8216;right&#8217; mouse button (bottom right of the trackpad) and am loving Expose and Spaces.  The only problem I have faced so far is the mouse guestures in Opera, but then what do you expect from a trackpad <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Without having the full expierence of a Mac yet, im going to hold of saying any more unless it turns out to be a nightmare <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2009%2F06%2Fthe-day-is-finally-here%2F&amp;title=The%20Day%20Is%20Finally%20Here" id="wpa2a_16">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2009/06/the-day-is-finally-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Server Access : SSH Keys</title>
		<link>http://www.bajb.net/2009/03/quick-server-access-ssh-keys/</link>
		<comments>http://www.bajb.net/2009/03/quick-server-access-ssh-keys/#comments</comments>
		<pubDate>Wed, 11 Mar 2009 21:12:02 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Access]]></category>
		<category><![CDATA[Keys]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[SSH]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=126</guid>
		<description><![CDATA[It has now reached the stage where I am logging into 20 &#8211; 40 different servers a day, which itself is quite time consuming when you know the server logins stored in your head.  However, all our servers have different access passwords and finding each server password takes a little too long (there is no [...]]]></description>
			<content:encoded><![CDATA[<p>It has now reached the stage where I am logging into 20 &#8211; 40 different servers a day, which itself is quite time consuming when you know the server logins stored in your head.  However, all our servers have different access passwords and finding each server password takes a little too long (there is no way I could remember all our server logins).</p>
<p>There is a great feature on UNIX  machines which will allow you to simply ssh into a server without the password as long as you have configured each machine.</p>
<p>The setup of this is pretty quick, there are only 3 main things you need to remember.</p>
<p>1. Generate the Key on the client box<br />
2. Copy the Key into your clipboard from the client box<br />
3. Enter the Key into  the server box from your clipboard</p>
<p><strong>Stage 1: Generating the Key</strong></p>
<pre>ssh-keygen -t dsa</pre>
<p>By running the above command, you will generate your client key.  You will be faced with a few questions, you should just be able to press enter with no answer on each question.</p>
<p>Generating public/private dsa key pair.<br />
Enter file in which to save the key (/root/.ssh/id_dsa):<br />
Enter passphrase (empty for no passphrase):<br />
Enter same passphrase again:<br />
Your identification has been saved in /root/.ssh/id_dsa.<br />
Your public key has been saved in /root/.ssh/id_dsa.pub.<br />
The key fingerprint is:<br />
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx</p>
<p><strong>Stage 2: Access the Key </strong></p>
<p>You will need to access the key that was just generated to place on your server so you can quickly access it.   First things first, you need to get the key onto the screen or into your email.  I would recommend using the screen output to avoid any formatting errors by your mail client.</p>
<p>Outputting onto the screen:</p>
<pre>cat ~/.ssh/id_dsa.pub</pre>
<p>Sending the output to your email:</p>
<pre>cat ~/.ssh/id_dsa.pub | mail email@domain.com</pre>
<p><strong>Stage 3: Storing the Key on the Server</strong><br />
Now you have the key, you just need to add it onto the server you are going to be SSH&#8217;ing into.</p>
<p>Open up the file &#8216;~/.ssh/authorized_keys&#8217; using your preferred editor.  I usually use nano, so:</p>
<pre>nano ~/.ssh/authorized_keys</pre>
<p>Then copy the key into the end of the file.  You need to ensure that the key stays on one line and you have one key per line.</p>
<p>Once you have saved the authorized_keys file, you should be able to hop back onto the client box and just type</p>
<pre>ssh root@hostname</pre>
<p>and you will be logged straight into shell on the &#8216;hostname&#8217; box.</p>
<p><strong>And thats all you need to do <img src='http://www.bajb.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </strong></p>
<p>This has saved me soo much time on a day to day basis and probably given me an extra 30 mins &gt; 1 hour a day to get some real work done.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2009%2F03%2Fquick-server-access-ssh-keys%2F&amp;title=Quick%20Server%20Access%20%3A%20SSH%20Keys" id="wpa2a_18">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2009/03/quick-server-access-ssh-keys/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Unix TimeStamp</title>
		<link>http://www.bajb.net/2009/02/unix-timestamp/</link>
		<comments>http://www.bajb.net/2009/02/unix-timestamp/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 17:27:42 +0000</pubDate>
		<dc:creator>Brooke Bryan</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[unix]]></category>

		<guid isPermaLink="false">http://www.bajb.net/?p=123</guid>
		<description><![CDATA[So, its only a few hours away from the timestamp 1234567890 and we just went past 1234543210. As always, sad enough to take a photo (well, Jordan (www.oxcreative.com) took the photo) on a monitor in our office which is displaying www.coolepochcountdown.com. Its only 6 or so hours till all hell breaks out and the time [...]]]></description>
			<content:encoded><![CDATA[<p>So, its only a few hours away from the timestamp 1234567890 and we just went past 1234543210.  As always, sad enough to take a photo (well, Jordan (<a href="http://www.oxcreative.com" target="_blank">www.oxcreative.com</a>) took the photo) on a monitor in our office which is displaying <a title="Cool Epoch Count Down" href="http://www.coolepochcountdown.com" target="_blank">www.coolepochcountdown.com</a>.   Its only 6 or so hours till all hell breaks out and the time starts going backwards (or we just see a nice timestamp come and go).</p>
<p style="text-align: center;"><img class="size-full wp-image-124 aligncenter" title="123453210" src="http://www.bajb.net/wp-content/uploads/2009/02/123453210.jpeg" alt="123453210" width="480" height="640" /></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.bajb.net%2F2009%2F02%2Funix-timestamp%2F&amp;title=Unix%20TimeStamp" id="wpa2a_20">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.bajb.net/2009/02/unix-timestamp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

