<?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>(apple)mac geek &#187; Geekery</title>
	<atom:link href="http://www.macgeek.co.za/category/geekery/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.macgeek.co.za</link>
	<description>broadcasting mac geekery to the universe</description>
	<lastBuildDate>Mon, 13 Dec 2010 08:54:33 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Facebook scales to 500 million users</title>
		<link>http://www.macgeek.co.za/2010/07/29/facebook-scales-to-500-million-users/</link>
		<comments>http://www.macgeek.co.za/2010/07/29/facebook-scales-to-500-million-users/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 10:05:21 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=252</guid>
		<description><![CDATA[A few of the big numbers Facebook deals with:
* 500 million active users
* 100 billion hits per day
* 50 billion photos
* 2 trillion objects cached, with hundreds of millions of requests per second
* 130TB of logs every day
Remember, there are only three numbers in computer science: 0, 1, and n. This is what scaling horizontally [...]]]></description>
			<content:encoded><![CDATA[<p>A few of the big numbers Facebook deals with:<br />
* 500 million active users<br />
* 100 billion hits per day<br />
* 50 billion photos<br />
* 2 trillion objects cached, with hundreds of millions of requests per second<br />
* 130TB of logs every day</p>
<p>Remember, there are only three numbers in computer science: 0, 1, and n. This is what scaling horizontally is &#8211; break out the infrastructure so that it&#8217;s trivial to add another instance of, say, a database server.</p>
<p>Read the full note from the Facebook engineering team: http://www.facebook.com/note.php?note_id=409881258919</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2010/07/29/facebook-scales-to-500-million-users/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Hacked MediaTemple sites inserting javascript malware</title>
		<link>http://www.macgeek.co.za/2010/07/27/hacked-mediatemple-sites-inserting-javascript-malware/</link>
		<comments>http://www.macgeek.co.za/2010/07/27/hacked-mediatemple-sites-inserting-javascript-malware/#comments</comments>
		<pubDate>Tue, 27 Jul 2010 20:31:44 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[hacked]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[MediaTemple]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=249</guid>
		<description><![CDATA[One of my friend&#8217;s sites recently had some javascript hacked, which cunningly hid the contents of what it wrote to the screen so that searching through the files with normal means didn&#8217;t even show what files were affected.
So here&#8217;s a script which shows possibly hacked files. Assuming you have ssh access to your server, save [...]]]></description>
			<content:encoded><![CDATA[<p>One of my friend&#8217;s sites recently had some javascript hacked, which cunningly hid the contents of what it wrote to the screen so that searching through the files with normal means didn&#8217;t even show what files were affected.</p>
<p>So here&#8217;s a script which shows possibly hacked files. Assuming you have ssh access to your server, save it as <code>check_for_hacked_js.sh</code> and then <code>chmod 755</code> it. To run it, type:</p>
<p><code>./check_for_hacked_js.sh</code></p>
<p>Once it&#8217;s done, check the contents of <code>hacked.txt</code> &#8211; and you&#8217;ll see all files which have possibly been hacked.</p>
<p><code>#!/bin/bash</p>
<p># This script scearches through all files on the server for<br />
# a certain string which writes some malware javascript to<br />
# client browsers, and then saves the results in a file<br />
# for inspection.</p>
<p># Written by Roger Saner on 2010.07.15</p>
<p>grep -ri "document.write(unescape" * > hacked.txt</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2010/07/27/hacked-mediatemple-sites-inserting-javascript-malware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Snow Leopard, Drupal, Macports and php</title>
		<link>http://www.macgeek.co.za/2009/09/25/snow-leopard-drupal-macports-and-php/</link>
		<comments>http://www.macgeek.co.za/2009/09/25/snow-leopard-drupal-macports-and-php/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 16:36:52 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=224</guid>
		<description><![CDATA[The short story is this: Snow Leopard has php 5.3.0 in, and although Drupal 6.14 now runs on that version, all previous drupal versions run on 5.2. [Solution? Manual compile - instructions below]
Mark Liyange&#8217;s php package has all of the nice stuff (like GD and mysql support) built into it, but it just doesn&#8217;t run [...]]]></description>
			<content:encoded><![CDATA[<p>The short story is this: Snow Leopard has php 5.3.0 in, and although Drupal 6.14 now runs on that version, all previous drupal versions run on 5.2. [Solution? Manual compile - instructions below]</p>
<p><span id="more-224"></span>Mark Liyange&#8217;s php package has all of the nice stuff (like GD and mysql support) built into it, but it just doesn&#8217;t run with apache on Snow Leopard (white screen).</p>
<p>There&#8217;s no simple way to install php 5.2 without compiling it from source. Macports has a php52 package, but<br />
<code>sudo port install php52</code> yeilded a nasty error:</p>
<blockquote><p>Undefined symbols:<br />
&#8220;_res_9_dn_expand&#8221;, referenced from:<br />
_zif_dns_get_mx in dns.o<br />
&#8220;_res_9_search&#8221;, referenced from:<br />
_zif_dns_get_mx in dns.o<br />
_zif_dns_check_record in dns.o<br />
&#8220;_res_9_dn_skipname&#8221;, referenced from:<br />
_zif_dns_get_mx in dns.o<br />
_zif_dns_get_mx in dns.o</p></blockquote>
<p>Solution? Compile it manually and then run <code>EXTRA_CFLAGS="-lresolv" make -j2</code></p>
<p>I did that, waited an hour, and it worked (hooray) except I had no mysql support. *sigh* I had to recompile with mysql, so&#8230;</p>
<h4>Steps to compile php 5.2 on Snow Leopard with mysql support</h4>
<p><b>Download</b> <a href="http://www.php.net/get/php-5.2.11.tar.bz2/from/a/mirror">php 5.2.11 source code</a> or do it via macports by <code>sudo port -v fetch php52</code></p>
<p><b>Uncompress</b> it, open terminal and go to the uncompressed folder (macports stores the download in <code>/opt/local/var/macports/distfiles/php5</code> (if you&#8217;ve already tried compiling with Macports, that&#8217;s where your download will be).</p>
<p><b>Configure</b> the build by typing:</p>
<p><code>./configure '--prefix=/opt/local' '--mandir=/opt/local/share/man' '--infodir=/opt/local/share/info' '--with-config-file-path=/opt/local/etc/php5' '--with-config-file-scan-dir=/opt/local/var/db/php5' '--enable-calendar' '--with-iconv=/opt/local' '--enable-exif' '--enable-ftp' '--enable-wddx' '--with-zlib=/opt/local' '--with-bz2=/opt/local' '--with-mysql=/usr/local/mysql' '--with-mysql-sock=/tmp/mysql.sock' '--with-sqlite' '--without-pdo-sqlite' '--with-libxml-dir=/opt/local' '--with-gettext=/opt/local' '--with-libexpat-dir=/opt/local' '--with-xmlrpc' '--enable-soap' '--enable-bcmath' '--enable-mbstring' '--enable-dba' '--enable-zip' '--with-openssl=/opt/local' '--with-mhash=/opt/local' '--with-mcrypt=/opt/local' '--with-mime-magic' '--with-xsl=/opt/local' '--with-curl=/opt/local' '--with-pcre-regex=/opt/local' '--with-gd' '--with-jpeg-dir=/opt/local' '--with-png-dir=/opt/local' '--enable-gd-native-ttf' '--without-pear' '--with-freetype-dir=/opt/local' '--with-ldap=/usr' '--with-kerberos=/usr' '--with-iodbc=/usr' '--with-apxs2=/usr/sbin/apxs'  '--with-mysqli=/usr/local/mysql/bin/mysql_config'</code></p>
<p>Notice the &#8211;with-mysql option, and the path to your mysql install (I used the binary from mysql.com so it&#8217;s in /usr/local/mysql &#8211; your folder will be different if you installed mysql with macports &#8211; same with &#8211;with-mysql-sock &#8211; mysql.com binary sticks it into /tmp/mysql.sock whereas macports puts it elsewhere &#8211; somewhere I can&#8217;t remember, but locate can help). </p>
<p>I also changed the &#8211;with-apxs2 option as it was pointing to my macports compile of apache2 which I&#8217;d decided not to use.</p>
<p>[You might wander, how did I get all of these options? After my first (successful) php 5.2 build (the one which didn't have mysql support), a phpinfo() shows the Configure Command used to configure from source. I copied that, and changed the relevant bits. And alas, found out too late I should've added mysqli support in, which is there now.]</p>
<p><b>Make</b> the binaries with <code>EXTRA_CFLAGS="-lresolv" make -j2</code><br />
Copy to the right locations with a <code>make install</code></p>
<p>If all goes well, your last step is to hook the php module into apache (php tries to do this itself, so just verify it worked). Open <code>/private/etc/apache2/httpd.conf</code> and search for &#8220;php&#8221;. That line should say:<br />
<code>LoadModule php5_module       /usr/libexec/apache2/libphp5.so</code></p>
<p>Now just restart apache and you&#8217;re all done! No more drupal white screens, and now you can actually access your database. Whohoo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/09/25/snow-leopard-drupal-macports-and-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>South Africans: it&#8217;s legal to add people to your newsletters without their permission</title>
		<link>http://www.macgeek.co.za/2009/09/21/south-africans-its-legal-to-add-people-to-your-newsletters-without-their-permission/</link>
		<comments>http://www.macgeek.co.za/2009/09/21/south-africans-its-legal-to-add-people-to-your-newsletters-without-their-permission/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 14:24:46 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[South Africa]]></category>
		<category><![CDATA[spam]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=209</guid>
		<description><![CDATA[Turns out it&#8217;s legal to spam people if you&#8217;re South African.

The Electronic Communications and Transactions Act, 2002 of South Africa states that
 1) Any person who sends unsolicited commercial communications to consumers, must provide the consumer
 a) with the option to cancel his or her subscription to the mailing list of that person; and
 b) [...]]]></description>
			<content:encoded><![CDATA[<p>Turns out it&#8217;s legal to spam people if you&#8217;re South African.<br />
<span id="more-209"></span><br />
The <a href="http://www.acts.co.za/ect_act/">Electronic Communications and Transactions Act, 2002</a> of South Africa states that<br />
<blockquote> 1) Any person who sends unsolicited commercial communications to consumers, must provide the consumer<br />
 a) with the option to cancel his or her subscription to the mailing list of that person; and</p>
<p> b) with the identifying particulars of the source from which that person obtained the consumer&#8217;s personal information, on request of the consumer.<br />
 2) No agreement is concluded where a consumer has failed to respond to an unsolicited communication.<br />
 3) Any person who fails to comply with or contravenes subsection (1) is guilty of an offence and liable, on conviction, to the penalties prescribed in section 89(1).<br />
 4) Any person who sends unsolicited commercial communications to a person who has advised the sender that such communications are unwelcome, is guilty of an offence and liable, on conviction, to the penalties prescribed in section 89(1).
</p></blockquote>
<p>What this means is that anyone can collect your data, sell it to a third party who subscribes you to their newsletter, and sends you unsolicited email, and it&#8217;s all quite legal.</p>
<p>At least in the States it&#8217;s double-opt (meaning you have to visit a website, enter your email address, click &#8220;subscribe&#8221; &#8211; that&#8217;s the first opt-in. Then check your email and click on a link to confirm you want to be subscribed &#8211; that&#8217;s the second opt-in). This means that any time someone adds you to their newsletter without your explicit permission, they&#8217;re spamming you. This is the correct way of doing it.</p>
<p>Which leaves me in a pickle. South African law governs the emails I receive, and spammers are not in contravention of the law. I don&#8217;t know which law applies when South Africans start spamming Americans (the mail recipient, or the sender?), but wouldn&#8217;t it be wonderful if South Africa changed her laws about unsolicited emails? Both <a href="http://mail.privacy.org/privacy/junk_mail/spam/">privacy.org</a> and <a href="http://en.wikipedia.org/wiki/E-mail_spam">wikipedia</a> define spam as &#8220;unsolicited commercial email.&#8221; </p>
<p>I wonder if I should keep on posting about <a href="http://www.macgeek.co.za/2009/09/16/stop-spamming-me-south-africans">South African spammers</a> given they&#8217;re not actually breaking the law, but are still spamming. What do you think?</p>
<p>[Update: people can get burned by this, like <a href="http://justinhartman.com/2009/09/22/our-experience-of-sending-bulk-emails-to-users/">Justin Hartman from Afrigator</a>. Always ask the people you're emailing if they'd like to be added to your newsletter - don't automatically subscribe them, even if you're convinced everyone wants your newsletter. The few who don't might get you shut down.]</p>
<p>[Update: turns out I misunderstood Justin &#8211; he wasn&#8217;t shut down by Mailchimp (his newsletter service provider) because of complaints. <a href="http://justinhartman.com/2009/09/22/our-experience-of-sending-bulk-emails-to-users/comment-page-1/#comment-4522">He says</a>, &#8220;According to Mailchimp our email lists were actually very healthy (i.e. not many complaints) but we just decided it wasn</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/09/21/south-africans-its-legal-to-add-people-to-your-newsletters-without-their-permission/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Import the correct package for Actionscript 3 functions</title>
		<link>http://www.macgeek.co.za/2009/09/19/import-the-correct-package-for-actionscript-3-functions/</link>
		<comments>http://www.macgeek.co.za/2009/09/19/import-the-correct-package-for-actionscript-3-functions/#comments</comments>
		<pubDate>Sat, 19 Sep 2009 17:13:20 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=207</guid>
		<description><![CDATA[Warning: geeky rant follows. If you don&#8217;t care about Flash and Actionscript, don&#8217;t bother reading. Go and play in the sunlight, or whatever you people do for fun.

Dear Adobe
Your actionscript 2 migration documentation sucks. It&#8217;s written for people who already know what to do and so therefore wouldn&#8217;t make mistakes in the first place. For [...]]]></description>
			<content:encoded><![CDATA[<p>Warning: geeky rant follows. If you don&#8217;t care about Flash and Actionscript, don&#8217;t bother reading. Go and play in the sunlight, or whatever you people do for fun.<br />
<span id="more-207"></span><br />
Dear Adobe</p>
<p>Your actionscript 2 migration documentation sucks. It&#8217;s written for people who already know what to do and so therefore wouldn&#8217;t make mistakes in the first place. For the rest of us, it&#8217;s kinda hard (and incredibly unintuitive) to follow. Since I&#8217;ve had to upgrade an Actionscript 2 project to Actionscript 3, I&#8217;ve been drinking your &#8220;Actionscript 3 is so much easier to use &#8211; fast and powerful too!&#8221; koolaid. Page 19 of your Actionscript migration cookbook helpfully shows how to do button clicks in Actionscript 3, which are a little different from Actionscript 2. Here we go:</p>
<p><code><br />
function onButtonClick(event:MouseEvent):void<br />
{<br />
    trace("button was clicked");<br />
} </p>
<p>my_button.addEventListener(MouseEvent.CLICK, onButtonClick); </code></p>
<p>Easy enough, yes? Listen for a click on the button my_button. When the button is clicked, execute the function onButtonClick which traces out &#8220;button was clicked&#8221;.</p>
<p>Except it doesn&#8217;t work. At all. Luckily your migration guide tells me, on page 9, that I can &#8220;Troubleshoot code more easily&#8221; with Actionscript 3. Fantastic &#8211; I can&#8217;t wait for a meaningful error message &#8211; let&#8217;s take a look.</p>
<p>Running that code in Flash gives the following error:<br />
<blockquote>1046: Type was not found or was not a compile-time constant: MouseEvent</p></blockquote>
<p>WTF?!?! What kind of error message is that?!</p>
<p>It&#8217;s because everything in Actionscript 3 is now done in classes, and we haven&#8217;t imported the correct class.</p>
<p>Simple. Load up the built-in Flash help (don&#8217;t even think of using the online Adobe help &#8211; it&#8217;s so slooooow) and search for &#8220;MouseEvent&#8221;. This renders a page which helpfully tells me that MouseEvent is part of the package flash.events</p>
<p>Therefore, all I need to do is put the following before my above code:<br />
<code>import flash.events.MouseEvent;</code></p>
<p>A wonderful place to put something like the above line of code would be, well I don&#8217;t know, how about page 19 of your Actionscript migration cookbook just above your button documentation?!?! Since that cookbook is written for newbies like me (and thank goodness I know what Object Oriented Programming is &#8211; can you imagine someone who doesn&#8217;t have a clue about that trying to figure out how to get button clicks working?!) why not include the correct classes to import before all of the sample code?</p>
<p>Otherwise it just makes your users feel stupid. I hate feeling stupid while using Flash &#8211; but I do all the time.</p>
<p>Regards<br />
A frustrated Flash user</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/09/19/import-the-correct-package-for-actionscript-3-functions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Stop spamming me, South Africans</title>
		<link>http://www.macgeek.co.za/2009/09/16/stop-spamming-me-south-africans/</link>
		<comments>http://www.macgeek.co.za/2009/09/16/stop-spamming-me-south-africans/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 08:50:36 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[South Africa]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=196</guid>
		<description><![CDATA[Spam sucks. Americans have gotten a lot better at online marketing recently: only double-opt in lists are allowed (by law). Whereas South Africans suck email addresses out of the air and send unsolicited mail (spam) without asking the recipients to opt-in first. I can&#8217;t stop them, so the best I can do is publish their [...]]]></description>
			<content:encoded><![CDATA[<p>Spam sucks. Americans have gotten a lot better at online marketing recently: only double-opt in lists are allowed (by law). Whereas South Africans suck email addresses out of the air and send unsolicited mail (spam) without asking the recipients to opt-in first. I can&#8217;t stop them, so the best I can do is publish their email addresses here in the hope spambots will pick them up, and send them lots of spam. Justice? I hope so.</p>
<p>[Update: turns out <a href="http://www.macgeek.co.za/2009/09/21/south-africans-its-legal-to-add-people-to-your-newsletters-without-their-permission/">double-opt in lists aren't required, and South Africans can subscribe people to their newsletters without their permission</a>. In my book, this exactly what spam is, but South African law doesn't agree.]</p>
<p>[Update: I've deleted Diane's details from this post. After emailing her, she promptly responded saying that I'd been on her database for over a year and only sent 3 emails in that time (which is true) and that I could've unsubscribed earlier, which is also true. She denies being a spammer and wants me to only go after bigger companies. While she's incorrect that she's not a spammer (i.e. she sent me unsolicited commercial email) she does say that she spends a lot of money monthly making sure she complies with the marketing regulations. Diane, legally you're in the right (i.e. you can subscribe anyone you like to your newsletter) but if you do that, you're breaching internet etiquette - <a href="http://www.macgeek.co.za/2009/09/21/south-africans-its-legal-to-add-people-to-your-newsletters-without-their-permission/">double opt-in lists</a> are the way to go. I hope you've stopped subscribing random people to your list.]</p>
<h4>The Diamond Life @ The Bank, Rosebank, Johannesburg, Sat 19 September</h4>
<p>Sent out by <a href="http://www.anythinggoes.co.za" rel="nofollow">anythinggoes.co.za</a> on Sept4 2009, this spam is about some new club launch in Jozi. Didn&#8217;t subscribe, lads.</p>
<h4>C2IT Computer Hardware</h4>
<p><a href="mailto:c2it@wec2it.com">c2it@wec2it.com</a> <a href="mailto:sales@c2it.co.za">sales@c2it.co.za</a> <a href="mailto:prize@c2it.co.za">prize@c2it.co.za</a></p>
<p>These guys make me chuckle. Their disclaimer at the bottom of their newsletter says,<br />
<blockquote>We support responsible and ethical email marketing practices. Please know that we respect your right to be purged from this marketing campaign. Removal from this email distribution list is automatically enforced by our email delivery system. Please click here to start the process for email deletion. </p></blockquote>
<p>Wow, they &#8220;respect my right to be purged from this marketing campaign.&#8221; What about my right to not be added to it in the first place?!?! They also say,<br />
<blockquote>The person addressed in the email is the sole authorised recipient.</p></blockquote>
<p> Authorised by who? Not by me, that&#8217;s for sure. </p>
<blockquote><p>We encourage and support best practices in responsible email marketing.</p></blockquote>
<p>Great! Best practices are double-opt in lists, otherwise you run the risk of annoying some random person out there who posts your website and your email addresses on his blog. I look forward to seeing if this post shows up higher on Google listings on searches for <a href="http://www.google.com/search?q=C2IT+Computer+Hardware">C2IT Computer Hardware</a>.</p>
<p><a href="http://www.thehubsa.co.za/forum_posts.asp?TID=50752&#038;PID=786212">These guys</a> are also very, very annoyed by C2IT&#8217;s spammy practices.</p>
<h4>[Updated: some Eagle-eyed car group selling Fords and Mazdas]</h4>
<p>[Updated: <a href="http://www.kscope.co.za" rel="nofollow">kaleidoscope advertising and marketing</a> say they got my name from Google.]</p>
<h4>Amlec Security CC</h4>
<p>Amlec Security cc<br />
15 Claybourne Street, Central, Pietermaritzburg<br />
Tel: 033 3429966     Fax: 033 3429965</p>
<p>http://www.amlec.co.za</p>
<p>sales@amlec.co.za and patricia@amlec.co.za<br />
They sell security stuff&#8230;and want me to buy some. No idea how I was subscribed to their list. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/09/16/stop-spamming-me-south-africans/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>ssh logins without passwords</title>
		<link>http://www.macgeek.co.za/2009/09/14/ssh-logins-without-passwords/</link>
		<comments>http://www.macgeek.co.za/2009/09/14/ssh-logins-without-passwords/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 18:55:04 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[ssh-keygen]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=193</guid>
		<description><![CDATA[According to &#8220;How To Become A Hacker&#8221;, No problem should ever have to be solved twice.
My problem: logging into a particular server via ssh. Each time I do that, I&#8217;ve got to open Keychain Access, search for &#8220;ssh&#8221;, find the correct Password item which I added in there previously, open it, click &#8220;Show password&#8221;, type [...]]]></description>
			<content:encoded><![CDATA[<p>According to <a href="http://www.catb.org/~esr/faqs/hacker-howto.html">&#8220;How To Become A Hacker&#8221;</a>, <a href="http://www.catb.org/~esr/faqs/hacker-howto.html#believe2">No problem should ever have to be solved twice.</a></p>
<p>My problem: logging into a particular server via ssh. Each time I do that, I&#8217;ve got to open Keychain Access, search for &#8220;ssh&#8221;, find the correct Password item which I added in there previously, open it, click &#8220;Show password&#8221;, type in my password to unlock my keychain, copy the password, paste it into terminal, and I&#8217;m in. A perfect task to be automated!</p>
<p>The outline of the solution is to use public/private key cryptography to automatically authenticate myself to the server without having to use a password each time. The steps are:</p>
<ul>
<li>Generate a public and private key pair using using <code>ssh-keygen -t rsa</code><br />
Just follow the prompts and choose the defaults (yes, the passphrase must be empty too). Your private key will be saved in /Users/your-name/.ssh/id_rsa and your public key will be saved in /Users/your-name/.ssh/id_rsa.pub</li>
<li>Edit id_rsa.pub and copy the key into textedit. Make sure the key ends with the username you&#8217;ll be logging into the remote system with (something like user@example.com).</li>
<li>Copy the contents in textedit, ssh into the server as per normal, and append it to the end of the authorized_keys file in the .ssh/ folder.</li>
<li>To test, log in again using ssh. If all has gone well, you shouldn&#8217;t need to re-type your password <img src='http://www.macgeek.co.za/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>You&#8217;re done! I&#8217;ve added an extra step, by creating a new file called ssh-example.com and putting my full ssh connection string in it. Then I headed over to <code>/usr/bin</code> and did a <code>sudo ln -s /path/to/script/ssh-example.com</code> which means next time I want to connect, I just type <code>ssh-example.com</code> into terminal.</p>
<p>Thanks to <a href="http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html">these guys</a> for the help.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/09/14/ssh-logins-without-passwords/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Weird characters after Wordpress upgrade</title>
		<link>http://www.macgeek.co.za/2009/09/11/weird-characters-after-wordpress-upgrade/</link>
		<comments>http://www.macgeek.co.za/2009/09/11/weird-characters-after-wordpress-upgrade/#comments</comments>
		<pubDate>Fri, 11 Sep 2009 09:40:12 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/?p=191</guid>
		<description><![CDATA[I&#8217;ve just upgraded a few wordpress sites, and it all went well, except for the fact that it didn&#8217;t. This site was easy and quick &#8211; I&#8217;m impressed with how polished the wordpress experience is. I uploaded the new files, visited wp-admin, and wordpress did it&#8217;s thing. Sweet! Changed the theme, realised it didn&#8217;t support [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just upgraded a few wordpress sites, and it all went well, except for the fact that it didn&#8217;t. This site was easy and quick &#8211; I&#8217;m impressed with how polished the wordpress experience is. I uploaded the new files, visited wp-admin, and wordpress did it&#8217;s thing. Sweet! Changed the theme, realised it didn&#8217;t support widgets, so added some code which let it do so, and voila. Done.</p>
<p>Then I did the same for a client&#8217;s site, except once the whole upgrade was done, her site was full of characters like </p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/09/11/weird-characters-after-wordpress-upgrade/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Payment gateways for websites in South Africa &#8211; a crowdsourcing experiment</title>
		<link>http://www.macgeek.co.za/2009/05/14/payment-gateways-for-websites-in-south-africa-a-crowdsourcing-experiment/</link>
		<comments>http://www.macgeek.co.za/2009/05/14/payment-gateways-for-websites-in-south-africa-a-crowdsourcing-experiment/#comments</comments>
		<pubDate>Thu, 14 May 2009 09:35:40 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[South Africa]]></category>
		<category><![CDATA[connections]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/2009/05/14/payment-gateways-for-websites-in-south-africa-a-crowdsourcing-experiment/</guid>
		<description><![CDATA[I&#8217;m currently at the Net Prophet conference listening to some fine minds reaching into the future of the connected sphere in South Africa over the next 10 years. Since so many people here are familiar with e-commerce, I&#8217;m posing a question to the dev AND marketing minds here.
I&#8217;ve developed a few e-commerce websites for South [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently at the <a href="http://www.netprophet.org.za">Net Prophet</a> conference listening to some fine minds reaching into the future of the connected sphere in South Africa over the next 10 years. Since so many people here are familiar with e-commerce, I&#8217;m posing a question to the dev AND marketing minds here.</p>
<p>I&#8217;ve developed a few e-commerce websites for South African clients, and each time I go through the same process with them. To get to the point where it&#8217;s possible to sell products online, you need:</p>
<ul>
<li>A business plan to show to a bank where you will</li>
<li>apply for a merchant account.</li>
</ul>
<p>This means you&#8217;re paying something around R200 a month so that you can accept credit card payments&#8230;AND per-transaction fees of around 5-8%. Not that you&#8217;ve accepted any payments yet, but you have the capability. Then you need a payment gateway, which you&#8217;ll typically pay around R100 a month for, and you&#8217;ll also pay a per-transaction fee, either a set fee or a percentage.</p>
<p>Once all this is done, it&#8217;s time to set up a website with a shopping cart, and start selling. The costs look like this:</p>
<ul>
<li>R200/month for the merchant account, plus 5-8% transaction fee.</li>
<li>R100/month for a payment gateway, plus per-transaction fees.</li>
<li>Monthly website hosting fees, say around R100/month.</li>
</ul>
<p>Total monthly costs: R400 plus per-transaction fees.</p>
<p>So before we even get to the website design and development costs, we&#8217;re looking at R400/month. Obviously people moving small volumes of product can&#8217;t spend R400 a month to do this, which is why most SME&#8217;s don&#8217;t have e-commerce sites.</p>
<p>A great solution is to have PayPal active in South Africa, but <a href="http://www.imod.co.za/index.php/2008/02/13/i-called-paypalcom-today-from-south-africa-and-asked-wasssup/">they&#8217;re not going to do that any time soon, or probably ever.</a> Since I&#8217;m a drupal developer, I posted a thread on <a href="http://groups.drupal.org/node/13319">groups.drupal.org</a> (which has grown quite a lot) to ask what payment gateways people use, and pretty much heard the same story.</p>
<p>So, 2 questions:</p>
<ul>
<li>Is getting a merchant account the only way of accepting credit card payments online, if you&#8217;re a South African?</li>
<li>If so, is there an easier and more cost-effective way of doing this></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/05/14/payment-gateways-for-websites-in-south-africa-a-crowdsourcing-experiment/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Compliation of [package x] failed: &#8216;RTLD_NEXT&#8217; undeclared</title>
		<link>http://www.macgeek.co.za/2009/05/11/compliation-of-package-x-failed-rtld_next-undeclared/</link>
		<comments>http://www.macgeek.co.za/2009/05/11/compliation-of-package-x-failed-rtld_next-undeclared/#comments</comments>
		<pubDate>Mon, 11 May 2009 10:30:41 +0000</pubDate>
		<dc:creator>Roger Saner</dc:creator>
				<category><![CDATA[Geekery]]></category>

		<guid isPermaLink="false">http://www.macgeek.co.za/2009/05/11/compliation-of-package-x-failed-rtld_next-undeclared/</guid>
		<description><![CDATA[Summary: the compilation of some packages fails under OS X exiting with the error  &#8216;RTLD_NEXT&#8217; undeclared.
Solution: rename /usr/local/include/dlfcn.h to /usr/local/include/dlfcn.h.backup
Tested on: Mac OS 10.4.11
Geekiness: 5 / 5

I&#8217;m a Mac user who loves the world of Unix software. I can&#8217;t live without wget, lynx and the GD2 library (for resizing images in drupal).
However, these packages [...]]]></description>
			<content:encoded><![CDATA[<div class="summary"><strong>Summary</strong>: the compilation of some packages fails under OS X exiting with the error <i> &#8216;RTLD_NEXT&#8217; undeclared</i>.<br />
<strong>Solution:</strong> rename /usr/local/include/dlfcn.h to /usr/local/include/dlfcn.h.backup<br />
<strong>Tested on:</strong> Mac OS 10.4.11<br />
<strong>Geekiness</strong>: 5 / 5
</div>
<p>I&#8217;m a Mac user who loves the world of Unix software. I can&#8217;t live without wget, lynx and the GD2 library (for resizing images in <a href="http://drupal.org">drupal</a>).</p>
<p>However, these packages aren&#8217;t natively available on Mac. No problem! I have 2 options: <a href="http://www.finkproject.org/">Fink</a> or <a href="http://www.macports.org/">Macports</a>.</p>
<p>I&#8217;ve used Fink for over 4 years and by and large have been happy with it. Just last week I was chatting to <a href="http://www.caktux.ca/">caktux</a> in the #drupal channel on irc.freenode.net (my Mac irc client is <a href="http://colloquy.info/">Colloquy</a> &#8211; because I can&#8217;t find anything better) and he convinced me to start using <a href="http://subversion.tigris.org/">subversion</a> to manage my drupal module code. No problem, I fired up Fink&#8230;and found a horribly outdated version of svn. Not even the &#8220;latest unstable&#8221; version was close to what it should have been.</p>
<p>Twice in the last 2 weeks I&#8217;ve had people tell me that they prefer MacPorts: caktux and <a href="http://www.developmentseed.org/node/adrian-rossouw">Adrian Rossouw</a>. So I decided to uninstall Fink (by opening Fink Commander, selecting all packages, and making sure that both source and binary installs were removed, and then removing the /sw folder) and install MacPorts, which is painless.</p>
<p>wget and lynx were quickly available (<code>sudo port install wget</code> and <code>sudo port install lynx</code>) but GD2 was another story. I got the same error under MacPorts that I got while attempting to install GNUcash under Fink. Compliation exited with this error:</p>
<p><code>/usr/bin/gcc-4.0  -o hacklocaledir.so -fPIC -bundle hacklocaledir.c<br />
hacklocaledir.c: In function '__open':<br />
hacklocaledir.c:44: error: 'RTLD_NEXT' undeclared (first use in this function)<br />
hacklocaledir.c:44: error: (Each undeclared identifier is reported only once<br />
hacklocaledir.c:44: error: for each function it appears in.)<br />
hacklocaledir.c: At top level:<br />
hacklocaledir.c:113: warning: alias definitions not supported in Mach-O; ignored<br />
make: *** [hacklocaledir.so] Error 1</code></p>
<p><b>&#8216;RTLD_NEXT&#8217; undeclared</b> is the offending bit, which means nothing to me. Last time this happened, I search the C files to see if I could manually declare RTLD_NEXT but gave up. Who knows what its value is supposed to be?</p>
<p>Well, the solution is something completely different. Turns out that everything in /usr/local will influence the compiler, particularly the existence of <b>/usr/local/include/dlfcn.h</b></p>
<p>I can&#8217;t remember why that particular file is there or even why renaming it to dlfcn.h.backup allows GNUcash and GD2 to compile, but it does. Googling the error didn&#8217;t return many useful results, except from the <a href="http://www.nabble.com/-16127:-help2man-td18708938.html">MacPorts ticket list</a>, so hopefully this blog post will help someone similarly bewildered.</p>
<p class="technorati-tags"><a href="http://technorati.com/tag/fink" rel="tag">fink</a>, <a href="http://technorati.com/tag/macports" rel="tag">macports</a>, <a href="http://technorati.com/tag/mac%20os%20x" rel="tag">mac os x</a>, <a href="http://technorati.com/tag/compilation" rel="tag">compilation</a>, <a href="http://technorati.com/tag/error" rel="tag">error</a>, <a href="http://technorati.com/tag/RTLD_NEXT" rel="tag">RTLD_NEXT</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.macgeek.co.za/2009/05/11/compliation-of-package-x-failed-rtld_next-undeclared/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

