<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Fuzzy Buckets</title>
<link>http://www.fuzzybuckets.org/fuzzybuckets/</link>
<description>Metadatative musings</description>
<copyright>Copyright 2011</copyright>
<lastBuildDate>Tue, 20 Dec 2011 13:10:24 +0000</lastBuildDate>
<generator>http://www.movabletype.org/?v=3.17</generator>
<docs>http://blogs.law.harvard.edu/tech/rss</docs> 

<item>
<title>rEFIt - Booting Linux with Bootcamp</title>
<description><![CDATA[<a title="rEFIt - An EFI Boot Menu and Toolkit" href="http://refit.sourceforge.net/">rEFIt - An EFI Boot Menu and Toolkit</a>

]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/12/refit_-_booting.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/12/refit_-_booting.html</guid>
<category></category>
<pubDate>Tue, 20 Dec 2011 13:10:24 +0000</pubDate>
</item>
<item>
<title>Cast the results of a subquery as an array then join as a string</title>
<description><![CDATA[<pre>
select p.*, <br/>
<span style="color: red;">array_to_string(array(select first_name||' '||last_name from publications.authors a where a.publication_id = p.id), ',') as aus </span>, 
<br/>
<span style="color: red;">array_to_string(array(select first_name||' '||last_name from publications.editors e where e.publication_id = p.id), ',') as eds</span> 
<br/>
from publications.publication_as_ris3 p<br/> 
where p.av in ('Forthcoming','Published') and p.id in ((select publication_id from publications.authors where first_name = 'Tony' and last_name = 'Kinder')union(select publication_id from publications.editors where first_name = 'Tony' and last_name = 'Kinder')) </pre>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/12/cast_the_result.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/12/cast_the_result.html</guid>
<category>PostgreSQL</category>
<pubDate>Wed, 07 Dec 2011 12:31:07 +0000</pubDate>
</item>
<item>
<title>Server replication in Postgres 9.1</title>
<description><![CDATA[<a href="http://michael.otacoo.com/postgresql-2/postgres-9-1-setup-a-synchronous-stand-by-server-in-5-minutes/">Postgres slave server in five minutes</a> 
<br/>
<br/>
<a href="/Postgres_9.1_replication_standby_files.tar.gz">Files: Postgres_9.1_replication_standby_files.tar.gz</a>
<br/>
<br/>
<a name="Binary_Replication_in_6_Steps" id="Binary_Replication_in_6_Steps"></a><h2> <span class="mw-headline"> Binary Replication in 6 Steps </span></h2>
<p>This 6-step guide, and all of the examples in this tutorial, assume that you have a master server at 192.168.0.1 and a standby server at 192.168.0.2 and that your database and its configuration files are installed at /var/lib/postgresql/data.  Replace those with whatever your actual server addresses and directories are.
</p><p>1. Edit postgresql.conf on the master to turn on streaming replication. Change these settings:
</p>
<pre> listen_address = '*'
 wal_level = hot_standby
 max_wal_senders = 3
</pre>
<p>2. Edit pg_hba.conf on the master in order to let the standby connect. 
</p>
<pre> host  replication   all   192.168.0.2/32      trust
</pre>
<p>3. Edit recovery.conf and postgresql.conf on the standby to start up replication and hot standby.  First, in postgresql.conf, change this line:
</p>
<pre> hot_standby = on
</pre>
<p>Then create a file in the standby's <b>data directory</b> (which is often the same directory as postgresql.conf and pg_hba.conf, except on some Linux distributions such as Debian and Ubuntu), called recovery.conf, with the following lines:
</p>
<pre> standby_mode = 'on'
 primary_conninfo = 'host=192.168.0.1'
</pre>
<p>4. Shutdown the master and copy the files.  You want to copy most but not all files between the two servers, excluding the configuration files and the pg_xlog directory. 
</p>
<pre>tar cvzhf /Users/paulhollands/Desktop/data.tgz --exclude 'pg_xlog' --exclude 'postgresql.conf' data/
</pre>
<p>5. Start the standby first, so that they can't get out of sync.
</p><p>6. Start the master.
</p>

]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/server_replicat.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/server_replicat.html</guid>
<category>PostgreSQL</category>
<pubDate>Sat, 26 Nov 2011 12:10:02 +0000</pubDate>
</item>
<item>
<title>Jython and Django Trial</title>
<description><![CDATA[<pre>
# cd /Users/paulhollands/jython2.5.2/bin
# django-admin.py startproject dss
# jython manage.py runserver
<span style="color: red">Validating models...

0 errors found
Django version 1.3.1, using settings 'dss.settings'
Development server is running at http://127.0.0.1:8000/
Quit the server with CONTROL-C.
[25/Nov/2011 23:00:47] "GET / HTTP/1.1" 200 2045</span>
</pre>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/jython_and_djan_1.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/jython_and_djan_1.html</guid>
<category>Jython</category>
<pubDate>Fri, 25 Nov 2011 23:02:16 +0000</pubDate>
</item>
<item>
<title>Is Solaris running in 64bit mode?</title>
<description><![CDATA[<pre>
isainfo -v
</pre>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/is_solaris_runn.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/is_solaris_runn.html</guid>
<category></category>
<pubDate>Wed, 23 Nov 2011 14:20:50 +0000</pubDate>
</item>
<item>
<title>Spine JS Framework</title>
<description><![CDATA[<p><a title="Spine" href="http://spinejs.com/docs/started">Spine</a></p>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/spine_js_framew.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/spine_js_framew.html</guid>
<category>JavaScript</category>
<pubDate>Sat, 05 Nov 2011 17:40:44 +0000</pubDate>
</item>
<item>
<title>Cast a date to Unix timestamp in Postgres</title>
<description><![CDATA[<pre>
'2012-04-01'<span style="color: red;">::timestamp::abstime::int4
</span>
</pre>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/cast_a_date_to.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/11/cast_a_date_to.html</guid>
<category>PostgreSQL</category>
<pubDate>Tue, 01 Nov 2011 11:31:08 +0000</pubDate>
</item>
<item>
<title>Detect an iPad and provide a non-Flash alternative</title>
<description><![CDATA[<pre>
try{ ["iPad","iPod","iPhone"].each(

  function(i){

    if(navigator.userAgent.indexOf(i) > -1){

      //Do iPad stuff here

      }

   }); } catch(e){ var meh = 'meh'; }

</pre>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/detect_an_ipad.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/detect_an_ipad.html</guid>
<category>jQuery</category>
<pubDate>Sun, 30 Oct 2011 20:40:46 +0000</pubDate>
</item>
<item>
<title>Jython and Django</title>
<description><![CDATA[<p><a title="Chapter 14: Web Applications With Django — Jython Book v1.0 documentation" href="http://www.jython.org/jythonbook/en/1.0/JythonDjango.html#deploying-your-first-application">Chapter 14: Web Applications With Django — Jython Book v1.0 documentation</a></p>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/jython_and_djan.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/jython_and_djan.html</guid>
<category>Jython</category>
<pubDate>Fri, 28 Oct 2011 22:00:48 +0000</pubDate>
</item>
<item>
<title>Groooooooooovy</title>
<description><![CDATA[<p><a title="Groovy - Home" href="http://groovy.codehaus.org/">Groovy - Home</a></p>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/groooooooooovy.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/groooooooooovy.html</guid>
<category></category>
<pubDate>Fri, 28 Oct 2011 21:41:43 +0000</pubDate>
</item>
<item>
<title>Matrix Asset Map for iOS</title>
<description><![CDATA[<p><a title="Zed Said Studio - Squiz Matrix Asset Map for iOS" href="http://www.zedsaid.com/blog/squiz-matrix-asset-map-for-ios">Zed Said Studio - Squiz Matrix Asset Map for iOS</a></p>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/matrix_asset_ma.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/matrix_asset_ma.html</guid>
<category></category>
<pubDate>Wed, 26 Oct 2011 21:55:19 +0000</pubDate>
</item>
<item>
<title>Textastic for iPad</title>
<description><![CDATA[<p><a title="Textastic Code Editor for iPad on the iTunes App Store" href="http://itunes.apple.com/us/app/textastic-code-editor/id383577124?mt=8">Textastic Code Editor for iPad on the iTunes App Store</a></p>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/textastic_for_i.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/textastic_for_i.html</guid>
<category></category>
<pubDate>Fri, 21 Oct 2011 22:40:41 +0000</pubDate>
</item>
<item>
<title>Alternately colour the rows in a table with jQuery</title>
<description><![CDATA[<pre>
var color = '#efefef';

var counter = 0;

function switch_bg(counter){ 

    if(eval(counter/2) == eval(counter/2).toFixed(0)){ return color; } 

    else { return 'white'; } 

    }

jQuery('tbody tr').each(

	function(){ 
	
		counter++;  
		
		jQuery(this).find('td').each(
		
			function(){ 
			
				jQuery(this).css({ 'background-color' : switch_bg(counter) }); 
				
				}
			
			);
			
		}
			 
	);
</pre>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/alternately_col.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/alternately_col.html</guid>
<category>jQuery</category>
<pubDate>Wed, 19 Oct 2011 18:42:43 +0000</pubDate>
</item>
<item>
<title>Student class needs to be adjusted</title>
<description><![CDATA[<pre>
	function get_hash_by_uun($uun){
		
		return $this->get_hash_by_id($this->get_id_by_uun($uun)); 
		
		}

	function get_id_by_uun($uun){

		$m = (int) str_replace('s', '', $uun);
		
		$reply = just::sql(sprintf("select student_id from student_full where matriculation_number = %d", $m));
		
		return $reply['first_row']['student_id'];		

		}
		
	function get_uun_by_id($id){
	
		$reply = just::sql(
			sprintf("select case
			when char_length(matriculation_number::varchar) = 5 then 's00'||matriculation_number
			when char_length(matriculation_number::varchar) = 6 then 's0'||matriculation_number
			else 's'||matriculation_number end as uun from student_full where student_id = %d", (int) $id)
			);
	
		return $reply['first_row']['uun'];
	
		}
</pre>]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/student_class_n.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/student_class_n.html</guid>
<category>PHP</category>
<pubDate>Tue, 11 Oct 2011 18:42:14 +0000</pubDate>
</item>
<item>
<title>Kill runaway Postgres threads</title>
<description><![CDATA[<pre>
kill `ps -ef | grep [p]ostgres | awk '{print $2}'`
</pre>
]]></description>
<link>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/kill_runaway_po.html</link>
<guid>http://www.fuzzybuckets.org/fuzzybuckets/archives/2011/10/kill_runaway_po.html</guid>
<category>PostgreSQL</category>
<pubDate>Mon, 10 Oct 2011 17:05:44 +0000</pubDate>
</item>


</channel>
</rss>
