<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>by Jacob Friis Saxberg</description><title>tech notes</title><generator>Tumblr (3.0; @technotes)</generator><link>http://technotes.tumblr.com/</link><item><title>How to connect to MongoDB from Node.js</title><description>&lt;p&gt;Node, meet Mongo: &lt;a href="https://gist.github.com/1307791"&gt;nodejs-meet-mongo.js&lt;/a&gt;&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/11830230108</link><guid>http://technotes.tumblr.com/post/11830230108</guid><pubDate>Sun, 23 Oct 2011 21:36:00 +0200</pubDate><category>nodejs</category><category>mongo</category><category>cloud</category><dc:creator>webjay</dc:creator></item><item><title>Rdio signup howto from outside US</title><description>&lt;ol&gt;&lt;li&gt;Get and install the &lt;a href="https://www.torproject.org/download/download-easy.html.en"&gt;Tor Browser Bundle&lt;/a&gt; (We need Tor, Vidalia, Firefox, and Torbutton).&lt;/li&gt;
&lt;li&gt;Start Vidalia.&lt;/li&gt;
&lt;li&gt;On Firefox Torbutton click &lt;strong&gt;Toggle Tor status&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;View the Network&lt;/strong&gt; in Vidalia.&lt;/li&gt;
&lt;li&gt;Memorize nicknames of US relays.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Settings&lt;/strong&gt;, choose &lt;strong&gt;Advanced&lt;/strong&gt; and &lt;strong&gt;Edit current torrc&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Insert nicknames comma separated after &lt;strong&gt;ExitNodes&lt;/strong&gt; (ExitNodes nickname1, nickname2).&lt;/li&gt;
&lt;li&gt;Insert this line somewhere: &lt;strong&gt;StrictExitNodes 1&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Use a New Identity&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Goto &lt;a href="http://rdio.com/"&gt;rdio.com&lt;/a&gt; and sign up.&lt;/li&gt;
&lt;/ol&gt;&lt;p&gt;Connect with me &lt;a href="http://rdio.com/people/webjay"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/11355926459</link><guid>http://technotes.tumblr.com/post/11355926459</guid><pubDate>Wed, 12 Oct 2011 17:39:00 +0200</pubDate><category>hack</category><category>vpn</category><category>music</category><dc:creator>webjay</dc:creator></item><item><title>When using iDefrag make sure you turn your screen brightness down before you reboot to keep the...</title><description>&lt;p&gt;When using &lt;a href="http://www.coriolis-systems.com/"&gt;iDefrag&lt;/a&gt; make sure you turn your screen brightness down before you reboot to keep the disks cooler.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/11197685406</link><guid>http://technotes.tumblr.com/post/11197685406</guid><pubDate>Sat, 08 Oct 2011 23:38:31 +0200</pubDate><category>defrag</category><category>mac</category><dc:creator>webjay</dc:creator></item><item><title>Git: How to upgrade from a remote branch</title><description>&lt;p&gt;git fetch [remote]&lt;/p&gt;
&lt;p&gt;git merge [remote]/[branch]&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/11096880289</link><guid>http://technotes.tumblr.com/post/11096880289</guid><pubDate>Thu, 06 Oct 2011 12:37:42 +0200</pubDate><category>git</category><dc:creator>webjay</dc:creator></item><item><title>Amazon CloudFront with Custom Origin via Cyberduck</title><description>&lt;p&gt;It took me some time to figure out how to enable Custom Origin in order to utilize Origin Pull on Amazon CloudFront via &lt;a href="http://cyberduck.ch/"&gt;Cyberduck&lt;/a&gt;, although I tried &lt;a href="http://trac.cyberduck.ch/wiki/help/en/howto/cloudfront#CustomOriginHTTPHTTPSDistributions"&gt;this&lt;/a&gt; and even &lt;a href="http://poller.se/2011/02/cloudfront-with-origin-pull-and-wp-super-cache/"&gt;that&lt;/a&gt;, so I thought I would share how I made it work.&lt;/p&gt;
&lt;ol&gt;&lt;li&gt;Create a &lt;a href="https://console.aws.amazon.com/cloudfront/home"&gt;CloudFront distribution&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Create a S3 bookmark in Cyberduck. Use your &lt;em&gt;Origin Bucket&lt;/em&gt; hostname as server.&lt;/li&gt;
&lt;li&gt;Edit the bookmark XML file.&lt;br/&gt;On a Mac it’s around here: Library/Application Support/Cyberduck/Bookmarks&lt;/li&gt;
&lt;li&gt;Add &lt;key&gt;Web URL&lt;/key&gt;&lt;string&gt;http://YourCustomOrigin.tld/&lt;/string&gt; inside &lt;dict&gt;. &lt;/li&gt;
&lt;li&gt;Connect to the server and select the &lt;em&gt;Distribution (CDN)&lt;/em&gt; panel from the Info window.&lt;/li&gt;
&lt;li&gt;Enable &lt;em&gt;Enable Amazon CloudFront distribution&lt;/em&gt;.&lt;/li&gt;
&lt;li&gt;You’re done.&lt;/li&gt;
&lt;/ol&gt;</description><link>http://technotes.tumblr.com/post/4340231058</link><guid>http://technotes.tumblr.com/post/4340231058</guid><pubDate>Mon, 04 Apr 2011 17:27:01 +0200</pubDate><dc:creator>webjay</dc:creator></item><item><title>FastCGI Process Manager as a Service Management Facility</title><description>&lt;p&gt;Here’s how to get FastCGI Process Manager (&lt;span&gt;&lt;a href="http://php-fpm.org/"&gt;PHP-FPM&lt;/a&gt;)&lt;/span&gt; to work with Service Management Facility (&lt;a href="http://en.wikipedia.org/wiki/Service_Management_Facility"&gt;SMF&lt;/a&gt;) on Solaris.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;git clone git://gist.github.com/888451.git php-fpm&lt;br/&gt;svccfg import php-fpm/php-fpm.xml&lt;/p&gt;
&lt;/blockquote&gt;
&lt;script src="https://gist.github.com/888451.js?file=php-fpm.xml"&gt;&lt;/script&gt;&lt;p&gt;Clone it &lt;a href="https://gist.github.com/888451"&gt;here&lt;/a&gt;.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/4259089859</link><guid>http://technotes.tumblr.com/post/4259089859</guid><pubDate>Fri, 01 Apr 2011 17:12:00 +0200</pubDate><category>php</category><category>nginx</category><category>gist</category><dc:creator>webjay</dc:creator></item><item><title>Git clone and your submodules</title><description>&lt;p&gt;After &lt;code&gt;git clone&lt;/code&gt; don’t forget:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;git submodule init&lt;/code&gt;&lt;br/&gt;&lt;code&gt;git submodule update&lt;/code&gt;&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/3987025393</link><guid>http://technotes.tumblr.com/post/3987025393</guid><pubDate>Sun, 20 Mar 2011 20:35:21 +0100</pubDate><dc:creator>webjay</dc:creator></item><item><title>Pretty print JSON via command line</title><description>&lt;p&gt;&lt;code&gt;curl &lt;a href="http://api.twitter.com/1/users/show/webjay.json"&gt;http://api.twitter.com/1/users/show/webjay.json&lt;/a&gt; | php -r "print_r(json_decode(fgets(STDIN)));"&lt;/code&gt;&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/2541839719</link><guid>http://technotes.tumblr.com/post/2541839719</guid><pubDate>Fri, 31 Dec 2010 14:49:58 +0100</pubDate><category>json</category><category>curl</category><category>php</category><category>twitter</category><category>api</category><dc:creator>webjay</dc:creator></item><item><title>CakePHP 1.3 currently only supports SimpleTest 1.0.
1.1 will give you Call to undefined method...</title><description>&lt;p&gt;CakePHP 1.3 currently only supports SimpleTest 1.0.&lt;/p&gt;
&lt;p&gt;1.1 will give you &lt;em&gt;Call to undefined method CakeHtmlReporter::SimpleReporter()&lt;/em&gt;.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/2185457517</link><guid>http://technotes.tumblr.com/post/2185457517</guid><pubDate>Sun, 12 Dec 2010 13:38:24 +0100</pubDate><category>cakephp</category><category>simpletest</category><dc:creator>webjay</dc:creator></item><item><title>How to get PID from a photo on Facebook</title><description>&lt;p&gt;&lt;ul&gt;&lt;li&gt;Goto photo album&lt;/li&gt;
&lt;li&gt;Copy id from url&lt;/li&gt;
&lt;li&gt;Goto &lt;a href="http://developers.facebook.com/docs/reference/rest/photos.getAlbums"&gt;photos.getAlbums&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Enter id in uid&lt;/li&gt;
&lt;li&gt;Get the aid from the album where the image is in&lt;/li&gt;
&lt;li&gt;Goto &lt;a href="http://developers.facebook.com/docs/reference/rest/photos.get"&gt;photos.get&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Enter aid&lt;/li&gt;
&lt;li&gt;You should now be able to get the pid&lt;/li&gt;
&lt;/ul&gt;&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/1600662944</link><guid>http://technotes.tumblr.com/post/1600662944</guid><pubDate>Wed, 17 Nov 2010 16:14:05 +0100</pubDate><category>pid</category><category>facebook</category><dc:creator>webjay</dc:creator></item><item><title>git checkout [tag] .</title><description>&lt;p&gt;`git checkout [tag] .` is great to avoid merge conflicts when upgrading a framework where you only mess in the files you created.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/596485721</link><guid>http://technotes.tumblr.com/post/596485721</guid><pubDate>Fri, 14 May 2010 02:08:57 +0200</pubDate><category>git</category><category>checkout</category><category>upgrade</category><category>tag</category><dc:creator>webjay</dc:creator></item><item><title>Twitter conversation bookmarklet</title><description>&lt;p&gt;My way of a Twitter conversation bookmarklet:&lt;br/&gt;&lt;a href="javascript:window.location.href='http://conv.smart.joyent.com/?tweet='+window.location.href;"&gt;Twitter conversation&lt;/a&gt;&lt;br/&gt;
(Drag it to your browser’s bookmark bar)&lt;/p&gt;

&lt;p&gt;Here’s an example:&lt;br/&gt;&lt;a href="http://conv.smart.joyent.com/?tweet=http://twitter.com/dsearls/status/7749106265"&gt;&lt;a href="http://conv.smart.joyent.com/?tweet=http://twitter.com/dsearls/status/7749106265"&gt;http://conv.smart.joyent.com/?tweet=http://twitter.com/dsearls/status/7749106265&lt;/a&gt;&lt;/a&gt;&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/337536498</link><guid>http://technotes.tumblr.com/post/337536498</guid><pubDate>Sat, 16 Jan 2010 16:41:00 +0100</pubDate><category>conversation</category><category>twitter</category><category>bookmarklet</category><category>favelet</category><dc:creator>webjay</dc:creator></item><item><title>Huawei device gone</title><description>&lt;p&gt;If you like me accidentally deletes your Huawei device, &lt;a href="http://www.mactalk.com.au/2009/09/03/thursday-how-to-huawei-mobile-broadband-snow-leopard/"&gt;this article&lt;/a&gt; may help.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/215412925</link><guid>http://technotes.tumblr.com/post/215412925</guid><pubDate>Sat, 17 Oct 2009 11:48:20 +0200</pubDate><category>mac,</category><category>huawei</category><category>snow leopard</category><category>sl</category><dc:creator>webjay</dc:creator></item><item><title>localhosting: FileVault = 403 Forbidden</title><description>&lt;p&gt;If you get &lt;em&gt;403 Forbidden&lt;/em&gt; after having turned FileVault on, the fix is to enable sharing for your Sites folder.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/212804030</link><guid>http://technotes.tumblr.com/post/212804030</guid><pubDate>Wed, 14 Oct 2009 14:10:00 +0200</pubDate><category>localhosting</category><category>lighttpd</category><category>403</category><category>forbidden</category><dc:creator>webjay</dc:creator></item><item><title>jQuery vs document.getElementById</title><description>&lt;p&gt;document.getElementById(‘someid’) = jQuery(‘#someid’).get(0)&lt;/p&gt;

&lt;p&gt;If you don’t get it, you don’t need to know.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/184465803</link><guid>http://technotes.tumblr.com/post/184465803</guid><pubDate>Thu, 10 Sep 2009 14:10:37 +0200</pubDate><category>jquery</category><category>javascript</category><dc:creator>webjay</dc:creator></item><item><title>Reinstall a Mac</title><description>&lt;p&gt;You’ll need the original DVD that came with it and old ones require 10.5.5.&lt;/p&gt;

&lt;p&gt;Update: If Snow Leopard, you just need to format the disk first.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/177380884</link><guid>http://technotes.tumblr.com/post/177380884</guid><pubDate>Tue, 01 Sep 2009 23:25:00 +0200</pubDate><category>mac</category><category>sl</category><dc:creator>webjay</dc:creator></item><item><title>MySQLDiff</title><description>&lt;p&gt;If you like me use &lt;a href="http://www.mysqldiff.org/"&gt;MySQLDiff&lt;/a&gt; to detect structure differences between two databases and create alter scripts I have a small tip for you here.&lt;/p&gt;

&lt;p&gt;If you get the error: &lt;em&gt;The configured Path for Session files () is not writeable!&lt;/em&gt; the reason is that &lt;em&gt;session.save_path&lt;/em&gt; is unset in your php.ini.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/152972252</link><guid>http://technotes.tumblr.com/post/152972252</guid><pubDate>Fri, 31 Jul 2009 16:29:22 +0200</pubDate><category>mysql</category><dc:creator>webjay</dc:creator></item><item><title>my Javascript isFloat</title><description>&lt;p&gt;&lt;code&gt; &lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;
&lt;pre&gt;function isFloat (value) {
	if (isNaN(value) || value.toString().indexOf(".") &lt; 0) {
		return false;
	} else {
		if (parseFloat(value)) {
			return true;
		} else {
			return false;
		}
	}
}
&lt;/pre&gt;
&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Inspired by &lt;a href="http://www.tehuber.com/article.php?story=200808191257324"&gt;Simple isFloat() Function&lt;/a&gt;&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/132853111</link><guid>http://technotes.tumblr.com/post/132853111</guid><pubDate>Tue, 30 Jun 2009 12:52:39 +0200</pubDate><dc:creator>webjay</dc:creator></item><item><title>AirPort Extreme + Express</title><description>&lt;p&gt;If you like me have an AirPort Extreme (n) + Express (g) and create a WDS network, the speed will be as fast as the slowest AirPort, which in my case was G, thus I made my Express only join my Extreme.&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/72886682</link><guid>http://technotes.tumblr.com/post/72886682</guid><pubDate>Sun, 25 Jan 2009 01:16:05 +0100</pubDate><dc:creator>webjay</dc:creator></item><item><title>Pootle setup as non root via SVN</title><description>&lt;p&gt;Login via SSH.&lt;br/&gt;
Go to a folder where you would like to have a working copy of &lt;a href="http://translate.sourceforge.net/wiki/pootle/index"&gt;Pootle&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Get the &lt;a href="https://translate.svn.sourceforge.net/svnroot/translate/src/branches/"&gt;branch&lt;/a&gt; or &lt;a href="https://translate.svn.sourceforge.net/svnroot/translate/src/tags/"&gt;tag&lt;/a&gt; you like. I chose &lt;a href="https://translate.svn.sourceforge.net/svnroot/translate/src/tags/Pootle-1-2-0/"&gt;Pootle-1-2-0&lt;/a&gt;:&lt;/p&gt;

&lt;p&gt;$ svn co &lt;a href="https://translate.svn.sourceforge.net/svnroot/translate/src/tags/Pootle-1-2-0"&gt;https://translate.svn.sourceforge.net/svnroot/translate/src/tags/Pootle-1-2-0&lt;/a&gt;&lt;br/&gt;
$ cd Pootle-1-2-0&lt;br/&gt;
$ ./setuppath&lt;br/&gt;
$ ./setpath&lt;br/&gt;
$ ./pootlesetup.py bdist&lt;br/&gt;
$ ls dist/&lt;/p&gt;

&lt;p&gt;Right there I hope you see something like &lt;i&gt;Pootle-1.2.0.solaris-2.11-i86pc.tar.gz&lt;/i&gt;&lt;/p&gt;

&lt;p&gt;$ cd ..&lt;/p&gt;

&lt;p&gt;Now unpack the packed file. Yours could have another name than mine:&lt;br/&gt;
$ tar xzfv Pootle-1-2-0/dist/Pootle-1.2.0.solaris-2.11-i86pc.tar.gz&lt;/p&gt;

&lt;p&gt;Set the PYTHONPATH to where site-packages is. Adjust the &lt;i&gt;italic&lt;/i&gt; to fit your environment:&lt;br/&gt;
$ export PYTHONPATH=$PYTHONPATH:&lt;i&gt;/home/mysite/homes/pootle/&lt;/i&gt;opt/local/lib/python2.4/site-packages&lt;/p&gt;

&lt;p&gt;Now we need jToolkit:&lt;br/&gt;
$ wget &lt;a href="http://puzzle.dl.sourceforge.net/sourceforge/jtoolkit/jToolkit-0.7.8.tar.gz"&gt;http://puzzle.dl.sourceforge.net/sourceforge/jtoolkit/jToolkit-0.7.8.tar.gz&lt;/a&gt;&lt;br/&gt;
$ tar xzf jToolkit-0.7.8.tar.gz&lt;br/&gt;
$ cd jToolkit-0.7.8&lt;br/&gt;
$ ./jToolkitSetup.py bdist&lt;br/&gt;
$ cd ..&lt;br/&gt;
$ tar xzf jToolkit-0.7.8/dist/jToolkit-0.7.8.solaris-2.11-i86pc.tar.gz&lt;/p&gt;

&lt;p&gt;and ElementTree:&lt;br/&gt;
$ svn co &lt;a href="http://svn.effbot.org/public/tags/elementtree-1.2.6-20050316"&gt;http://svn.effbot.org/public/tags/elementtree-1.2.6-20050316&lt;/a&gt;&lt;br/&gt;
$ cd elementtree-1.2.6-20050316&lt;br/&gt;
$ python setup.py bdist&lt;br/&gt;
$ cd ..&lt;br/&gt;
$ tar xzf elementtree-1.2.6-20050316/dist/elementtree-1.2.6-20050316.solaris-2.11-i86pc.tar.gz&lt;/p&gt;

&lt;p&gt;make sure translate can be found in site-packages&lt;br/&gt;
$ cp -r Pootle-1-2-0/translate opt/local/lib/python2.4/site-packages&lt;/p&gt;

&lt;p&gt;lxml:&lt;br/&gt;
$ wget &lt;a href="http://pypi.python.org/packages/source/l/lxml/lxml-2.1.3.tar.gz"&gt;http://pypi.python.org/packages/source/l/lxml/lxml-2.1.3.tar.gz&lt;/a&gt;&lt;br/&gt;
$ tar xvzf lxml-2.1.3.tar.gz&lt;br/&gt;
$ cd lxml-2.1.3&lt;br/&gt;
$ python setup.py bdist&lt;br/&gt;
$ cd ..&lt;br/&gt;
$ tar xzf lxml-2.1.3/dist/lxml-2.1.3.solaris-2.11-i86pc.tar.gz&lt;/p&gt;

&lt;p&gt;kid:&lt;br/&gt;
$ wget &lt;a href="http://www.kid-templating.org/dist/0.9.6/kid-0.9.6.tar.gz"&gt;http://www.kid-templating.org/dist/0.9.6/kid-0.9.6.tar.gz&lt;/a&gt;&lt;br/&gt;
$ cd kid-0.9.6&lt;br/&gt;
$ python setup.py bdist&lt;br/&gt;
$ cd ..&lt;br/&gt;
$ tar xzf kid-0.9.6/dist/kid-0.9.6.solaris-2.11-i86pc.tar.gz&lt;/p&gt;

&lt;p&gt;Now you should be able to start&lt;br/&gt;
./opt/local/bin/PootleServer&lt;/p&gt;</description><link>http://technotes.tumblr.com/post/62902484</link><guid>http://technotes.tumblr.com/post/62902484</guid><pubDate>Thu, 04 Dec 2008 01:44:00 +0100</pubDate><category>pootle</category><category>joyent</category><category>solaris</category><dc:creator>webjay</dc:creator></item></channel></rss>

