<?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>Tohir Solomons</title>
	<atom:link href="http://www.tohir.co.za/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tohir.co.za</link>
	<description></description>
	<lastBuildDate>Mon, 29 Apr 2013 13:01:20 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Where&#8217;s the PHPUnit command-line test runner?</title>
		<link>http://www.tohir.co.za/2013/04/29/wheres-the-phpunit-command-line-test-runner/</link>
		<comments>http://www.tohir.co.za/2013/04/29/wheres-the-phpunit-command-line-test-runner/#comments</comments>
		<pubDate>Mon, 29 Apr 2013 13:00:41 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Software and Technology]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[PHPUnit]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=510</guid>
		<description><![CDATA[After you have installed the PHPUnit via PEAR, how do you get access to the phpunit executable. Here&#8217;s the steps from the beginning on Ubuntu. 1) Install PHP Pear if you don&#8217;t have it installed sudo apt-get install php-pear 2) Enable auto discovery sudo pear config-set auto_discover 1 3) Install PHPUnit via PEAR sudo pear [...]]]></description>
				<content:encoded><![CDATA[<p>After you have installed the PHPUnit via PEAR, how do you get access to the phpunit executable. Here&#8217;s the steps from the beginning on Ubuntu.</p>
<p>1) Install PHP Pear if you don&#8217;t have it installed</p>
<pre>sudo apt-get install php-pear</pre>
<p>2) Enable auto discovery</p>
<pre>sudo pear config-set auto_discover 1</pre>
<p>3) Install PHPUnit via PEAR</p>
<pre>sudo pear install pear.phpunit.de/PHPUnit</pre>
<p>4) Locate the PHP PEAR bin(ary) directory</p>
<pre> pear config-get bin_dir</pre>
<p>Mine shows:</p>
<pre>tohir@tohir-MS-7759:~$ pear config-get bin_dir
/usr/local/zend/bin</pre>
<p>If you then list the files in that directory, you&#8217;ll see:</p>
<pre>tohir@tohir-MS-7759:~$ ls /usr/local/zend/bin
apachectl extract_meta_data.sh jqd.sh monitor-node.sh pecl phpize scd setup_sc.sh uninstall.sh zdd.sh ZManifest zs-setup
clean_semaphores.sh gui_passwd.sh lighttpdctl.sh pear php <span style="color: #ff0000;"><strong>phpunit</strong></span> scd.sh shell_functions.rc watchdog zdpack zmd
create_cert.sh jqd MonitorNode peardev php-config rulemerge setup_jq.sh support_tool.sh zdd zendctl.sh zs-manage</pre>
<p>You can then create a symlink to make it easier to access:</p>
<pre>sudo ln -s /usr/local/zend/bin/phpunit /usr/bin/phpunit</pre>
<p><map name='google_ad_map_510_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/510?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_510_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=510&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2013%2F04%2F29%2Fwheres-the-phpunit-command-line-test-runner%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2013/04/29/wheres-the-phpunit-command-line-test-runner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>wkhtmltoimage crashing at 25%</title>
		<link>http://www.tohir.co.za/2013/04/13/wkhtmltoimage-crashing-at-25/</link>
		<comments>http://www.tohir.co.za/2013/04/13/wkhtmltoimage-crashing-at-25/#comments</comments>
		<pubDate>Sat, 13 Apr 2013 06:05:11 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=506</guid>
		<description><![CDATA[I&#8217;ve had to turn off this functionality till I could find a fix. Sometimes, it worked, sometimes it didn&#8217;t. One URL in particular I had difficult fixing was: http://www.musjidnoor.za.net/index.html Console Results xvfb-run &#8211;auto-servernum &#8211;server-num=1 wkhtmltoimage &#8211;disable-javascript &#8211;use-xserver -f png -n &#8216;http://www.musjidnoor.za.net/index.html&#8217; /var/www/docprogress_temp/1365305896.png Loading page (1/2) Rendering (2/2) ^C==============&#62; ] 25% Thought came in my mind, [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve had to turn off this functionality till I could find a fix. Sometimes, it worked, sometimes it didn&#8217;t. One URL in particular I had difficult fixing was: http://www.musjidnoor.za.net/index.html</p>
<p><strong>Console Results</strong></p>
<blockquote><p>xvfb-run &#8211;auto-servernum &#8211;server-num=1 wkhtmltoimage &#8211;disable-javascript &#8211;use-xserver -f png -n &#8216;http://www.musjidnoor.za.net/index.html&#8217; /var/www/docprogress_temp/1365305896.png<br />
Loading page (1/2)<br />
Rendering (2/2)<br />
^C==============&gt; ] 25%</p></blockquote>
<p>Thought came in my mind, maybe it&#8217;s because there page is either big or long. Let&#8217;s try cropping the height:</p>
<blockquote><p>xvfb-run &#8211;auto-servernum &#8211;server-num=1 wkhtmltoimage &#8211;disable-javascript &#8211;use-xserver -f png &#8211;crop-h 6000 -n &#8216;http://www.musjidnoor.za.net/index.html&#8217; /var/www/docprogress_temp/1365305896.png<br />
Loading page (1/2)<br />
Rendering (2/2)<br />
Done</p></blockquote>
<p>Wallah, that seems to fix it. I gradually increase mine to 6000 which is more sufficient in my case. Suggestion, try adding &#8211;crop-h {a height}, and see if this fixes it.</p>
<p><map name='google_ad_map_506_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/506?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_506_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=506&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2013%2F04%2F13%2Fwkhtmltoimage-crashing-at-25%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2013/04/13/wkhtmltoimage-crashing-at-25/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to bring your mouse back to life in Ubuntu</title>
		<link>http://www.tohir.co.za/2011/02/02/how-to-bring-your-mouse-back-to-life-in-ubuntu/</link>
		<comments>http://www.tohir.co.za/2011/02/02/how-to-bring-your-mouse-back-to-life-in-ubuntu/#comments</comments>
		<pubDate>Wed, 02 Feb 2011 01:55:48 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software and Technology]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=500</guid>
		<description><![CDATA[Occasionally, I encounter the issue where my mouse moves around the screen, but I can&#8217;t left click. Right click does work. Instead of rebooting tonight, thought I&#8217;d try to find a solution tabbing away on the keyboard whilst I still had a browser open. Solution: Press Ctrl+F1 to go to a terminal screen Login with [...]]]></description>
				<content:encoded><![CDATA[<p>Occasionally, I encounter the issue where my mouse moves around the screen, but I can&#8217;t left click. Right click does work. Instead of rebooting tonight, thought I&#8217;d try to find a solution tabbing away on the keyboard whilst I still had a browser open.</p>
<p>Solution:</p>
<ul>
<li>Press Ctrl+F1 to go to a terminal screen</li>
<li>Login with your username and password</li>
<li>sudo mobprobe -r psmouse</li>
<li>sudo modprobe psmouse</li>
<li>Ctrl+F7</li>
</ul>
<p>This removes the mouse &#8216;driver&#8217; from the kernel, and re-adds it. Wallaa!</p>
<p><map name='google_ad_map_500_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/500?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_500_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=500&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2011%2F02%2F02%2Fhow-to-bring-your-mouse-back-to-life-in-ubuntu%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2011/02/02/how-to-bring-your-mouse-back-to-life-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Zend Server CE on Ubuntu Maverick (10.10)</title>
		<link>http://www.tohir.co.za/2011/01/24/installing-zend-server-ce-on-ubuntu-maverick-10-10/</link>
		<comments>http://www.tohir.co.za/2011/01/24/installing-zend-server-ce-on-ubuntu-maverick-10-10/#comments</comments>
		<pubDate>Mon, 24 Jan 2011 15:08:25 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[apt-get]]></category>
		<category><![CDATA[maverick]]></category>
		<category><![CDATA[repo]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[zend]]></category>
		<category><![CDATA[zendserver]]></category>
		<category><![CDATA[zendserverce]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=496</guid>
		<description><![CDATA[Spent the day trying to install Zend Server on Ubuntu (10.10), but ran into so much blockers, thought it would be worth a blog! After following all the steps, I got hit with: W: Failed to fetch http://repos.zend.com/deb/ce/dists/ce/Release Unable to find expected entry  non-free/source/Sources in Meta-index file (malformed Release file?) Kept trying sudo-apt-get update whilst [...]]]></description>
				<content:encoded><![CDATA[<p>Spent the day trying to install Zend Server on Ubuntu (10.10), but ran into so much blockers, thought it would be worth a blog!</p>
<p>After following all the steps, I got hit with:</p>
<pre>W: Failed to fetch http://repos.zend.com/deb/ce/dists/ce/Release
Unable to find expected entry  non-free/source/Sources in Meta-index file (malformed Release file?)</pre>
<p>Kept trying <strong>sudo-apt-get update</strong> whilst cursing Zend, and still the same.</p>
<p>Solution: Disable the sources repository in /etc/apt/sources.list.</p>
<pre>#deb-src http://repos.zend.com/deb/ce ce non-free</pre>
<p>Next, trying to install, and keep getting dependencies issues. There are two (old files) that need to be downloaded, and then everything works fine:</p>
<ul>
<li><a href="http://security.ubuntu.com/ubuntu/pool/main/k/krb5/libkrb53_1.6.dfsg.3~beta1-2ubuntu1.6_amd64.deb">libkrb53</a></li>
<li><a href="http://mirrors.us.kernel.org/ubuntu//pool/universe/m/mysql-dfsg-5.0/libmysqlclient15off_5.1.30really5.0.83-0ubuntu3_amd64.deb">libmysqlclient15off</a></li>
</ul>
<p>They were in older distributions, but no longer are!</p>
<p>Once those two files are manually installed (sudo dpkg -i), the rest is plain sailing.</p>
<p><map name='google_ad_map_496_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/496?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_496_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=496&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2011%2F01%2F24%2Finstalling-zend-server-ce-on-ubuntu-maverick-10-10%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2011/01/24/installing-zend-server-ce-on-ubuntu-maverick-10-10/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Thunderbird + Correct Indentity Plugin</title>
		<link>http://www.tohir.co.za/2011/01/05/thunderbird-and-correct-indentity-plugin/</link>
		<comments>http://www.tohir.co.za/2011/01/05/thunderbird-and-correct-indentity-plugin/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 07:45:45 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Software and Technology]]></category>
		<category><![CDATA[Usability]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[thunderbird]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=491</guid>
		<description><![CDATA[On both Ubuntu (and Windows if I ever had to use it), I prefer Thunderbird as my email client over Evolution or MS Outlook purely due to two reasons: I love the way it allows one to show an inbox for each account. I do not need to filter them, or create labels. The ability [...]]]></description>
				<content:encoded><![CDATA[<p>On both Ubuntu (and Windows if I ever had to use it), I prefer <a href="http://www.mozillamessaging.com/en-US/thunderbird/">Thunderbird</a> as my email client over Evolution or MS Outlook purely due to two reasons:</p>
<ol>
<li>I love the way it allows one to show an inbox for each account. I do not need to filter them, or create labels.</li>
<li>The ability to set a limit on incoming mail. Once activated, it only downloads the first 50kb of each email giving an idea of what the email contains, and it saves the frustration of downloading emails with large attachments, particularly from people I don&#8217;t know.</li>
</ol>
<p>However, the one mistake I often make is clicking &#8220;Write&#8221;, type in the email, and clicking send, without checking that I&#8217;m sending it from the right email address. Fortunately, another great thing with Firefox and Thunderbird is <a href="https://addons.mozilla.org/en-US/thunderbird/extensions/">extensions</a>, and there is one that fixes that called <a href="https://addons.mozilla.org/en-US/thunderbird/addon/1203/">Correct Identity</a>.</p>
<p>It allow one to set an alternative default email address for writing an email. Eg. The account is support@&#8230;, but whenever you send out email from that account, it should be from tohir@&#8230;, that&#8217;s the issue it solves!</p>
<p><map name='google_ad_map_491_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/491?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_491_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=491&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2011%2F01%2F05%2Fthunderbird-and-correct-indentity-plugin%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2011/01/05/thunderbird-and-correct-indentity-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why CSS gets confusing and why you should use SASS</title>
		<link>http://www.tohir.co.za/2010/09/30/why-css-gets-confusing-and-why-you-should-use-sass/</link>
		<comments>http://www.tohir.co.za/2010/09/30/why-css-gets-confusing-and-why-you-should-use-sass/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 11:19:26 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[HTML, CSS]]></category>
		<category><![CDATA[Internet]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/2010/09/30/why-css-gets-confusing-and-why-you-should-use-sass/</guid>
		<description><![CDATA[Take the following HTML file with CSS. How will div2 look? &#60;html lang="en"&#62; &#60;head&#62; &#60;title&#62;SASS Test&#60;/title&#62; &#60;style type="text/css"&#62; div.div1 div { border: 4px solid yellow; background: yellow; } div.div1 { background: red; border: 4px solid blue; } div.div1 div.div2 { background: green; } div.div2 { border: 10px solid orange; padding: 10px; } &#60;/style&#62; &#60;/head&#62; &#60;body&#62; [...]]]></description>
				<content:encoded><![CDATA[<p>Take the following HTML file with CSS. How will div2 look?</p>
<pre>&lt;html lang="en"&gt;
&lt;head&gt;

&lt;title&gt;SASS Test&lt;/title&gt;

&lt;style type="text/css"&gt;
    div.div1 div {
        border: 4px solid yellow;
        background: yellow;
    }
    div.div1 {
        background: red;
        border: 4px solid blue;
    }</pre>
<pre>    div.div1 div.div2 {
        background: green;
    }</pre>
<pre>    div.div2 {
        border: 10px solid orange;
        padding: 10px;
    }
&lt;/style&gt;
&lt;/head&gt;
&lt;body&gt;
    &lt;div class="div1"&gt;
        Div 1
        &lt;div class="div2"&gt;
           Div 2
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p>Based on the last definitions, you will expect div2 to have:</p>
<ul>
<li>a green background color</li>
<li>a 10 pixel solid orange border</li>
<li>a padding of 10 pixels between the border and the text</li>
</ul>
<p>Actually it will appear like this:</p>
<div><img style="max-width: 800px;" src="http://www.tohir.co.za/wp-content/uploads/2010/09/sass1.png" alt="" /></div>
<p>It does NOT have a 10 pixel solid orange border, but instead a four pixel solid yellow border. Even though CSS is cascading, it cascades by CSS rules, not by definitions. Even though an alternate definition is last, if it doesn&#8217;t cascade over an existing rule, it will not be applied.<span id="more-481"></span></p>
<p>The way of forcing it to it override a rule is to use !important. Redefining the last rule as:</p>
<p><span style="font-family: Courier New;"> div.div2 {<br />
border: 10px solid orange !important;<br />
padding: 10px;<br />
} </span></p>
<p>results in:</p>
<div><img style="max-width: 800px;" src="http://www.tohir.co.za/wp-content/uploads/2010/09/sass2.png" alt="" /></div>
<p>Also note that even though padding does not have !important, it gets applied because a definition for padding does not exist.</p>
<p>And just to make things more confusing, lets add another rule for div, so that the final CSS looks like this:</p>
<p><span style="font-family: Courier New;"> &lt;style type=&#8221;text/css&#8221;&gt;<br />
div.div1 div {<br />
border: 4px solid yellow;<br />
background: yellow;<br />
}</span></p>
<p>div.div1 {<br />
background: red;<br />
border: 4px solid blue;<br />
}</p>
<p>div.div1 div.div2 {<br />
background: green;<br />
}</p>
<p>div.div2 {<br />
border: 10px solid orange !important;<br />
padding: 10px;<br />
}</p>
<p>div {<br />
padding: 100px;<br />
}<br />
&lt;/style&gt;</p>
<p>We&#8217;ve added a definition for div to have a padding of 100 pixels. This results in:</p>
<div><img style="max-width: 800px;" src="http://www.tohir.co.za/wp-content/uploads/2010/09/sass3.png" alt="" /></div>
<p>It gets applied to the outer div, but not the inner! Enough to confound even the most hardcore .Net/Java developers.</p>
<p>!important may help, but this hack is not the best way of overcoming CSS issues.</p>
<p>One better way of doing this is to use <a href="http://sass-lang.com">Syntactically Awesome Stylesheets</a> or just Sass as its call. But first some theory on what Sass is.</p>
<p>According to its <a href="http://sass-lang.com/about.html">website</a>,</p>
<blockquote><p>Sass is a meta-language on top of CSS that’s used to describe the style of a document cleanly and structurally, with more power than flat CSS allows. Sass both provides a simpler, more elegant syntax for CSS and implements various features that are useful for creating manageable stylesheets.</p></blockquote>
<p>Sass provides a means for structuring your CSS in a nested way with rules, variables and functions, but that then has to be compiled (by Sass) into a CSS file.</p>
<p><strong>Installation of Sass</strong></p>
<p>Sass requires the Ruby programming language. Sass itself is a Ruby Gem (as its called). Installation for Ubuntu can be found here: <a href="http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/">http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/</a></p>
<p>Check that you are using version 3, as it has more features.<br />
<strong><br />
Creating Your first Sass file</strong></p>
<p>1) Create a file call mycss.scss. SCSS is the generally accepted standard for Sass files.</p>
<p>2) Next, using a terminal, browse to the directory where that file is, and run the following command:</p>
<p><span style="font-family: Courier New;">sass -t compact &#8211;watch mycss.scss:mycss.css</span></p>
<p>Or in the case of the problem with Ubuntu:</p>
<p><span style="font-family: Courier New;">~/.gem/ruby/1.8/bin/sass -t compact &#8211;watch mycss.scss:mycss.css</span></p>
<p>3) In the  mycss.scss file, add the following:</p>
<p><span style="font-family: Courier New;">body {<br />
div.div1 {<br />
border: 1px solid red;<br />
background: yellow;</span></p>
<p>div.div2 {<br />
border: 1px solid blue;<br />
}</p>
<p>}<br />
}</p>
<p>If you now open the mycss.css file, its generated contents will be:</p>
<p><span style="font-family: Courier New;">body div.div1 { border: 1px solid red; background: yellow; }<br />
body div.div1 div.div2 { border: 1px solid blue; } </span></p>
<p>Notice how it generates the rules, and how they use the same style of rules to make it cascade properly. When sharing the original Sass file, it also makes it easier for others to understand the CSS.</p>
<p>The SCSS file is more important the the CSS file, as the CSS file can just be regenerated. All additions should be made to the SCSS file, but dont forget to generate the CSS one.</p>
<p>Lastly, a quick look at other CSS features. Assume that the design team decided when showing a boxed item, the borders of each of the sides should be different. Top has to be ridge, right dotted, bottom solid, and left dashed.</p>
<div>
<p><img style="max-width: 800px;" src="http://www.tohir.co.za/wp-content/uploads/2010/09/sass4.png" alt="" /></p>
</div>
<p>In Sass you can write a function (called a mixin), and then call that function later on.</p>
<p><span style="font-family: Courier New;">@mixin borders($width, $color){<br />
border-top:    $width ridge  $color;<br />
border-right:  $width dotted $color;<br />
border-bottom: $width solid  $color;<br />
border-left:   $width dashed $color;<br />
}</span></p>
<p>body {<br />
div.div1 {<br />
@include borders(blue, 10px);<br />
background: yellow;</p>
<p>div.div2 {<br />
border: 1px solid blue;<br />
}</p>
<p>}<br />
}</p>
<p>Will generate (uncompacted):</p>
<p><span style="font-family: Courier New;">body div.div1 {<br />
border-top: blue ridge 10px;<br />
border-right: blue dotted 10px;<br />
border-bottom: blue solid 10px;<br />
border-left: blue dashed 10px;<br />
background: yellow; }<br />
body div.div1 div.div2 {<br />
border: 1px solid blue; }</span></p>
<p>Much more features are demonstrated on the website at <a href="http://sass-lang.com/">http://sass-lang.com/</a></p>
<p><map name='google_ad_map_481_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/481?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_481_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=481&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F09%2F30%2Fwhy-css-gets-confusing-and-why-you-should-use-sass%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/09/30/why-css-gets-confusing-and-why-you-should-use-sass/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wireshark Filters &#8211; Ajax Example</title>
		<link>http://www.tohir.co.za/2010/09/30/wireshark-filters-ajax-example/</link>
		<comments>http://www.tohir.co.za/2010/09/30/wireshark-filters-ajax-example/#comments</comments>
		<pubDate>Thu, 30 Sep 2010 08:05:12 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software and Technology]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=461</guid>
		<description><![CDATA[I&#8217;ve blogged about Wireshark before, and how to use it for Ajax. Next is a quick tip on how to use Wireshark&#8217;s filters feature to only watch for AJAX requests. In the filter tab, enter: http.request.uri contains "php" &#124;&#124;  http.content_type == "text/html" This effectively reads, only log items where: The HTTP request contains PHP, OR [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve blogged about <a href="http://www.tohir.co.za/2010/02/01/getting-started-with-wireshark-the-fiddler-for-ubuntu/">Wireshark</a> before, and <a href="http://www.tohir.co.za/2010/05/10/wireshark-and-trucated/">how to use it for Ajax</a>. Next is a quick tip on how to use Wireshark&#8217;s filters feature to only watch for AJAX requests. In the filter tab, enter:</p>
<pre>http.request.uri contains "php" ||  http.content_type == "text/html"</pre>
<p>This effectively reads, only log items where:</p>
<ol>
<li>The HTTP request contains PHP, OR</li>
<li>The HTTP response is &#8220;text/html&#8221;</li>
</ol>
<p><a href="http://www.tohir.co.za/wp-content/uploads/2010/09/wireshark_filters.png"><img class="alignnone size-large wp-image-462" title="Wireshark Filters" src="http://www.tohir.co.za/wp-content/uploads/2010/09/wireshark_filters-1024x472.png" alt="Wireshark Filters" width="819" height="378" /></a></p>
<p>Useful, dont have to wade through whats an Ajax response, bypass images, etc. One thing that would be nice would be if the area that shows the filter expression was longer!</p>
<p><map name='google_ad_map_461_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/461?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_461_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=461&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F09%2F30%2Fwireshark-filters-ajax-example%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/09/30/wireshark-filters-ajax-example/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Preparing For Hajj &#8211; Some tips for techno hajjis</title>
		<link>http://www.tohir.co.za/2010/09/27/preparing-for-hajj-some-tips-for-techno-hajjis/</link>
		<comments>http://www.tohir.co.za/2010/09/27/preparing-for-hajj-some-tips-for-techno-hajjis/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 19:45:53 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Islam and Muslims]]></category>
		<category><![CDATA[Reflections/Thoughts]]></category>
		<category><![CDATA[South Africa]]></category>
		<category><![CDATA[3G]]></category>
		<category><![CDATA[electricity]]></category>
		<category><![CDATA[Haj]]></category>
		<category><![CDATA[Internet Banking]]></category>
		<category><![CDATA[Madina]]></category>
		<category><![CDATA[Makka]]></category>
		<category><![CDATA[plugs]]></category>
		<category><![CDATA[Travel]]></category>
		<category><![CDATA[Wifi]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=436</guid>
		<description><![CDATA[Going on Hajj nowadays is so much different from years ago. As someone that was fortunate to be there in 1995 and last year (2009), the differences were stark. No longer did we have queue for prepaid phones, we could video chat (skype) with our family back home. No longer did people have to wait [...]]]></description>
				<content:encoded><![CDATA[<p>Going on Hajj nowadays is so much different from years ago. As someone that was fortunate to be there in 1995 and last year (2009), the differences were stark. No longer did we have queue for prepaid phones, we could video chat (skype) with our family back home. No longer did people have to wait for photos to be developed. We shared them immediately on Facebook. And yes, we took photos of ourselves inside the Haram and MMS&#8217;d it home!</p>
<p>Opting to take our gadgets also came with its own preparation. Having learnt from the advice of well-wishers, as well as mistakes from previous trips, here are some tips we can offer.</p>
<p><strong><img class="alignright size-full wp-image-447" title="travel plug converter" src="http://www.tohir.co.za/wp-content/uploads/2010/09/travelplugconverter.jpg" alt="" width="270" height="270" />Electricity &#8211; Get a Travel Plug Converter<br />
</strong></p>
<p>Saudi Arabia uses the Type F plug, South Africa the Type M. One Hajji noted that his hotel also had the Type G plug (as used in the UK), but this is very rare.</p>
<p>I found a travel plug converter at Diskem, but its generally available at stores like Cape Union Mart. Also try places that sell suitcases. Type G to Type M is easier to find and available at Clicks for instance, but rather take the Type F. This also makes a handy gift to Hujaaj!</p>
<p>We also took with a multiplug allowing us to comfortably power the laptop as well as charge our cellphones, camera battery, electric tooth brushes, electric shavers.</p>
<p>Saudi Arabia also uses 220V so there&#8217;s no need to change the voltage on your equipment.</p>
<div id="attachment_435" class="wp-caption alignleft" style="width: 190px"><img class="size-full wp-image-435 " title="Type F Plug" src="http://www.tohir.co.za/wp-content/uploads/2010/09/type_f_large.jpg" alt="Type F Plug" width="180" height="130" /><p class="wp-caption-text">Type F Plug</p></div>
<div id="attachment_437" class="wp-caption alignleft" style="width: 190px"><img class="size-full wp-image-437 " title="Type M Plug" src="http://www.tohir.co.za/wp-content/uploads/2010/09/type_m_large.jpg" alt="Type M Plug" width="180" height="130" /><p class="wp-caption-text">Type M Plug</p></div>
<div id="attachment_438" class="wp-caption alignleft" style="width: 190px"><img class="size-full wp-image-438 " title="Type G Plug" src="http://www.tohir.co.za/wp-content/uploads/2010/09/type_g_large.jpg" alt="Type G Plug" width="180" height="130" /><p class="wp-caption-text">Type G Plug</p></div>
<p><strong>WiFi and Internet</strong></p>
<p>Even if Wifi is advertised  free in your hotel, it may only be available on a certain floor. Check with your travel agent whether the hotels you are staying in offer WiFi and whether WiFi is offered on all floors or just some. I found WiFi more available in Medina than in Makka. It may be because of the construction work, but speculation on my side.</p>
<p><strong>Internet on your Cellphone</strong></p>
<p>Have a habit of quickly checking Facebook on your cell phone, I was shocked to see how expensive this is with airtime just running away. My guess is that it costs something in the region of Rs2 (Saudi Riyals) a megabyte which would be more expensive than South Africa.</p>
<p>Tip: Keep this is mind that their billing rate may be different. Also check your airtime balance regularly, and modify the settings of programs that connect to the Internet. In my case, one of them was one that downloads the daily weather.</p>
<p><strong>3G Internet for Your Laptop</strong></p>
<p>It is possible to take your 3G card with and purchase a one 30 day data bundle from a service provider in Saudi Arabia. There are two advantages to doing this:</p>
<ul>
<li>If your hotel does not offer WiFi on your floor, you can comfortably Skype and video chat with your family in the comfort of your hotel room.</li>
<li>If your package involves moving to Azizia, you&#8217;ll have Internet access there! Azizia is nice, but WiFi is not standard there <img src='http://www.tohir.co.za/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </li>
</ul>
<p><strong>Some tips on purchasing a data bundle</strong></p>
<p>1) Saudi Arabia has two main operators: <a href="http://www.stc.com.sa/">STC</a> and <a href="http://www.mobily.com.sa/wps/portal">Mobily</a>. STC is the equivalent of Telkom, advertises everything but has nothing and unlikely to help you if they sense you are going to make them THINK or do some real work. The service from Mobily on the hand was wonderful. They knew their products, no queues.</p>
<p>2) Purchase the data bundle in Medina</p>
<p>Makka is full. Since it is also winter there, there is a shorter time between the Waqts and also to get to the Haram on time. By the time you get to the front of the queue, its time for Salaah. However, try and purchase it closer to the end of your stay in Medina, but with enough time to go back to them if any issues arise (about three days before you leave). A data bundle lasts for 30 days. The later you purchase your data bundle, the later for your stay in Makka you can use it. Otherwise you run in the dillemma of wanting to purchase a data bundle just a few days before Haj and risk losing the balance of data/airtime.</p>
<p>3) Requirements</p>
<p>I purchased the data bundle at the Mobily Store in Central Medina (opposite the Hilton hotel). They required a photocopy of my passport (which I did not have) but accepted my Al Anwar card. Best to take a photocopy of your passport with.</p>
<p>4) The connection settings for Mobiliy is built into Ubuntu, just setup a Mobile connection. For Windows users, they are:</p>
<p>Number: *99#<br />
APN: web2</p>
<p>However, the pamphlet given is quite handy. The salesman will also tell you that you can bring your laptop to them and they will help you set it up!</p>
<p><strong>AIR Time</strong></p>
<div id="attachment_444" class="wp-caption alignright" style="width: 200px"><a href="http://www.tohir.co.za/wp-content/uploads/2010/09/sawa_recharge_card.jpg"><img class="size-full wp-image-444" title="Recharge Card" src="http://www.tohir.co.za/wp-content/uploads/2010/09/sawa_recharge_card.jpg" alt="Recharge Card" width="190" height="113" /></a><p class="wp-caption-text">Recharge Card</p></div>
<p>Airtime is sold in various denominations. However, if you buy a larger, you stand to gain extra airtime. For example, a Rs100 airtime card gives your Rs150 airtime (cant recall exactly, but it was in this region).</p>
<p>Best of all, the cards have two scratch areas, so even if it is a single card, the airtime can go on to two phones. As they say in Cape Town, &#8220;Klap together&#8221;.</p>
<p>This also offers the opportunity for the budding entrepreneurs in Makka and Medina. Check that you are not paying the extra Rs50 when you dont have to. Also, some of them will sell you half the card for Rs75. There are so many of them, just walk away and move to the next guy.</p>
<p><strong>Internet Banking</strong></p>
<p>The number one rule: <strong>Update your profile to receive your One Time Password (OTP) via email</strong>. By default, most people receive their OTP via SMS. Unless you have international roaming activated and WORKING, you may not receive this, which may stop you from performing any transactions via the Internet.</p>
<p>Standard Bank users can only opt to receive their OTP via SMS or email. FNB users have the option of receiving the OTP via email in addition to SMS.</p>
<p>However, for both of them, you need to setup the OTP via email before leaving your hometown. Usually someone from the branch has to phone you, ask you to verify your details, etc. before they set this.</p>
<p>For Standard Bank, if you set up a recipient, you will not need to enter a OTP when doing a transfer to them.</p>
<p><strong>ATMs, Banking in General</strong></p>
<p>Please check that your card does not expire whilst you are on Haj. Banks usually have your new card a month before they expire, and you can request them to send you one earlier as well.</p>
<p>You are able to do cash withdrawals at Al Rajhi bank. In Makka, they are situated in front of the Hilton hotel. In Medina, there&#8217;s an ATM on the first floor of the Hilton Hotel. In most of the more modern malls, they do accept cards. Some of the smaller shops usually share one machine that services a group of them, so you may have to walk to another point to have your card swiped.</p>
<p><strong>Wires</strong></p>
<p>Make a checklist of all the wires and cables you need to take with. Its annoying to be on the other side of the world only to discover you dont have a cable you need.</p>
<p><strong>Back Home Preparation</strong></p>
<p>Apart from checking that you are hooked up, ensure that your family is likewise. Are they able to connect to the Internet, start skype, etc.? Does their webcam give a grainy or feed, etc.? Run a few checks before you leave, and also put them in contact with someone thats knowledgeable. If they are going to use someone else&#8217;s Internet connection, ensure that you have budgeted for this as well.</p>
<p><strong>Lastly,</strong></p>
<p>Where possible, assist your fellow Hujaaj if you can. The Holy Prophet Muhammad (PBUH) said that the best of people are those who assist others, and how much greater is this in the Holy Cities. If you find any of these tips handy, please make Duah that the Almighty grants the author to apply these tips himself in the Holy Lands, Insha Allah</p>
<p><map name='google_ad_map_436_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/436?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_436_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=436&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F09%2F27%2Fpreparing-for-hajj-some-tips-for-techno-hajjis%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/09/27/preparing-for-hajj-some-tips-for-techno-hajjis/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>[Video] Shaykh Sadullah Khan&#8217;s Khutbah at Claremont Main Road Masjid</title>
		<link>http://www.tohir.co.za/2010/09/04/video-shaykh-sadullah-khans-khutbah-at-claremont-main-road-masjid/</link>
		<comments>http://www.tohir.co.za/2010/09/04/video-shaykh-sadullah-khans-khutbah-at-claremont-main-road-masjid/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 05:26:30 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Reflections/Thoughts]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=413</guid>
		<description><![CDATA[The khutbah is available online, but sometimes it&#8217;s just easier to watch it online.]]></description>
				<content:encoded><![CDATA[<p>The khutbah is available <a href="http://www.cmrm.co.za/index.php?option=com_content&amp;view=article&amp;id=365:khutbah-13-august-2010&amp;catid=46:khutab&amp;Itemid=562">online</a>, but sometimes it&#8217;s just easier to watch it online.</p>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/HNmdTHfg2jo?feature=oembed&#038;fs=1" frameborder="0" allowfullscreen></iframe></p>
<p><iframe width="500" height="375" src="http://www.youtube.com/embed/LXKIlrCE7vM?feature=oembed&#038;fs=1" frameborder="0" allowfullscreen></iframe></p>
<p><iframe width="500" height="281" src="http://www.youtube.com/embed/jTp5Sm8vc6U?feature=oembed&#038;fs=1" frameborder="0" allowfullscreen></iframe></p>
<p><map name='google_ad_map_413_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/413?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_413_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=413&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F09%2F04%2Fvideo-shaykh-sadullah-khans-khutbah-at-claremont-main-road-masjid%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/09/04/video-shaykh-sadullah-khans-khutbah-at-claremont-main-road-masjid/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing SASS 3.0 on Ubuntu 10.4</title>
		<link>http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/</link>
		<comments>http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/#comments</comments>
		<pubDate>Fri, 09 Jul 2010 13:40:51 +0000</pubDate>
		<dc:creator>Tohir</dc:creator>
				<category><![CDATA[HTML, CSS]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software and Technology]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sass]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.tohir.co.za/?p=409</guid>
		<description><![CDATA[Currently, the HAML/Sass version on Ubuntu is 2.2.17. Version 3, also known as Classy Cassidy, includes new features. So how can you install it on Ubuntu. Firstly, you need Ruby: sudo apt-get install ruby Thereafter (without sudo): gem install haml-edge This will install Haml and Sass into your directory, but at least you will have [...]]]></description>
				<content:encoded><![CDATA[<p>Currently, the <a href="http://sass-lang.com/">HAML/Sass</a> version on Ubuntu is 2.2.17. Version 3, also known as Classy Cassidy, includes new features. So how can you install it on Ubuntu.</p>
<p>Firstly, you need Ruby:</p>
<pre>sudo apt-get install ruby</pre>
<p>Thereafter (without sudo):</p>
<pre>gem install haml-edge</pre>
<p>This will install Haml and Sass into your directory, but at least you will have access to the latest version. Message that appears:</p>
<pre>WARNING:  Installing to ~/.gem since /var/lib/gems/1.8 and
 /var/lib/gems/1.8/bin aren't both writable.
WARNING:  You don't have /home/tohir/.gem/ruby/1.8/bin in your PATH,
 gem executables will not run.
Successfully installed haml-edge-3.1.49
1 gem installed</pre>
<p>You can test that it is the latest version by:</p>
<pre>~/.gem/ruby/1.8/bin/sass -version
</pre>
<p>Which should return:</p>
<pre>Haml/Sass 3.1.49 (Bleeding Edge)</pre>
<p>Lastly, there is a nice command to watch files and auto generate an updated version:</p>
<pre>~/.gem/ruby/1.8/bin/sass -t compact --watch [inputfile]:[outputfile]</pre>
<p>like:</p>
<pre>~/.gem/ruby/1.8/bin/sass -t compact --watch browseView.scss:browseView.css</pre>
<p><map name='google_ad_map_409_d66c8ad2bfa7c2ab'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/409?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_409_d66c8ad2bfa7c2ab' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=409&amp;url= http%3A%2F%2Fwww.tohir.co.za%2F2010%2F07%2F09%2Finstalling-sass-3-0-on-ubuntu-10-4%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://www.tohir.co.za/2010/07/09/installing-sass-3-0-on-ubuntu-10-4/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
