<?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>Shami's Blog &#187; Technical</title>
	<atom:link href="http://blog.al-shami.net/index.php/category/technical/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.al-shami.net</link>
	<description>A Mushroom A Day Keeps The Koopas Away</description>
	<lastBuildDate>Thu, 13 May 2010 06:15:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ubuntu 10.04</title>
		<link>http://blog.al-shami.net/index.php/ubuntu-10-04/</link>
		<comments>http://blog.al-shami.net/index.php/ubuntu-10-04/#comments</comments>
		<pubDate>Sun, 02 May 2010 06:29:50 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[lucid]]></category>
		<category><![CDATA[lucid lynx]]></category>
		<category><![CDATA[lynx]]></category>
		<category><![CDATA[position]]></category>
		<category><![CDATA[right]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[ubuntu lucid]]></category>
		<category><![CDATA[ubuntu lucid lynx]]></category>
		<category><![CDATA[ubuntu lynx]]></category>
		<category><![CDATA[window icons]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=239</guid>
		<description><![CDATA[When Ubuntu 9.10 came out I was very eager to try it, but sadly I was very disappointed. So when I was downloading 10.04 I wasn&#8217;t really expecting anything. I&#8217;m glad I was wrong.
So far it appears the sound and flash issues have been fixed. Empathy seems to have gotten some improvements. Most noticeable are [...]]]></description>
			<content:encoded><![CDATA[<p>When Ubuntu 9.10 came out I was very eager to try it, but sadly I was very disappointed. So when I was downloading 10.04 I wasn&#8217;t really expecting anything. I&#8217;m glad I was wrong.</p>
<p>So far it appears the sound and flash issues have been fixed. Empathy seems to have gotten some improvements. Most noticeable are the fact it now saves the window position of the contact list, and gives you an indication when the person you&#8217;re chatting with on Google Talk is typing something on the keyboard.</p>
<p>If you hate the new window button placement, like I do, here&#8217;s how to fix it:</p>
<ol>
<li>Open gconf-editor</li>
<li>Got to /apps/metacity/general</li>
<li>Change &#8220;button_layout&#8221; to &#8220;menu:minimize,maximize,close&#8221;</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/ubuntu-10-04/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Delete all Messages from a POP3 Account</title>
		<link>http://blog.al-shami.net/index.php/delete-all-messages-from-a-pop3-account/</link>
		<comments>http://blog.al-shami.net/index.php/delete-all-messages-from-a-pop3-account/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 10:52:54 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[all]]></category>
		<category><![CDATA[clear]]></category>
		<category><![CDATA[clear inbox]]></category>
		<category><![CDATA[delete]]></category>
		<category><![CDATA[delete all]]></category>
		<category><![CDATA[delete all messages]]></category>
		<category><![CDATA[delete message]]></category>
		<category><![CDATA[empty]]></category>
		<category><![CDATA[empty inbox]]></category>
		<category><![CDATA[inbox]]></category>
		<category><![CDATA[messages]]></category>
		<category><![CDATA[pop]]></category>
		<category><![CDATA[pop3]]></category>
		<category><![CDATA[purge]]></category>
		<category><![CDATA[purge inbox]]></category>
		<category><![CDATA[verio]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=236</guid>
		<description><![CDATA[Here at the office, we host a few domains with Verio. Not my choice, and I&#8217;m not happy with it. We also host some mailboxes for one of those domains with Verio. I got a message from Verio support saying the mailboxes for that domain are occupying around 1GB of space, and that we need [...]]]></description>
			<content:encoded><![CDATA[<p>Here at the office, we host a few domains with <a href="http://www.verio.com/">Verio</a>. Not my choice, and I&#8217;m not happy with it. We also host some mailboxes for one of those domains with Verio. I got a message from Verio support saying the mailboxes for that domain are occupying around 1GB of space, and that we need to delete some of them.</p>
<p>Turns out the mailboxes were neglected for months, and one of those mailboxes got around 55,000 messages.</p>
<p>Simple enough, I said, let&#8217;s log in to web mail, keep recent relevant messages and delete the rest. But the web mail interface kept timing out, and I couldn&#8217;t access any of the accounts. Seems they built their own web mail interface, which tries to load everything in your mailbox. This makes it time out when a mailbox has this huge number of messages.</p>
<p>After contacting Verio&#8217;s support they gave me an IP address to use as an IMAP server, which, surprisingly (well, not really, I expected it) wouldn&#8217;t connect. After a few days of deliberation the department in charge of the accounts decided to delete all messages in all accounts.</p>
<p>At first I configured Evolution to download all messages from POP3, which thankfully worked (Thanks Dovecot), but that took too long, and downloading 50K messages would overload our uplink. A simple solution would be as follows:</p>
<pre><code>
#!/usr/bin/python

import poplib

server = 'server'
user = 'user'
password = 'password'

whenToQuit = 500
loop = 0
totalMessages = 0 

while 1:
        M = poplib.POP3(server)
        M.user(user)
        M.pass_(password)
        numMessages = len(M.list()[1])
        if totalMessages == 0: totalMessages = numMessages
        i = 0
        for i in range(numMessages):
                print 'Deleted %d out of %d messages' % (loop * whenToQuit + i + 1, totalMessages)
                M.dele(i+1)
                if i == whenToQuit - 1:
                        M.quit()
                        loop = loop + 1
                        break

        if i != whenToQuit - 1:
                M.quit()
                break
</code></pre>
<p>Since the actual deletion of messages happens when a client &#8220;quit&#8221;s, I wrote this to do a quit after 500 message, this will enable you to quit the script after some time without having to lose all the progress.</p>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/delete-all-messages-from-a-pop3-account/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speeding up Firefox under Ubuntu</title>
		<link>http://blog.al-shami.net/index.php/speeding-up-firefox-under-ubuntu/</link>
		<comments>http://blog.al-shami.net/index.php/speeding-up-firefox-under-ubuntu/#comments</comments>
		<pubDate>Sun, 14 Feb 2010 09:16:08 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=220</guid>
		<description><![CDATA[Ever wonder why browsing under Ubuntu is slower than Windows even on the same network? Well, it has to do with Ubuntu enabling IPv6 by default. This means Ubuntu will try IPv4 only after IPv6 times out. Also, Firefox comes built with Pango by default which makes it slower than it should be. I&#8217;ve fixed [...]]]></description>
			<content:encoded><![CDATA[<p>Ever wonder why browsing under Ubuntu is slower than Windows even on the same network? Well, it has to do with Ubuntu enabling IPv6 by default. This means Ubuntu will try IPv4 only after IPv6 times out. Also, Firefox comes built with Pango by default which makes it slower than it should be. I&#8217;ve fixed that on Karmic Koala, other versions should be similar. Here&#8217;s how to do it:</p>
<p>
<h3>Disable IPv6 globally:</h3>
<pre><code>sudo vi /etc/default/grub</code></pre>
<p> then find
<pre><code>GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"</code></pre>
<p> and replace it with
<pre><code>GRUB_CMDLINE_LINUX_DEFAULT=”ipv6.disable=1 quiet splash”</code></pre>
<p> Then update grub from the command line
<pre><code>sudo update-grub</code></pre>
</p>
<h3>Tell Firefox not to load Pango:</h3>
<pre><code>vi ~/.bashrc</code></pre>
<p> and add
<pre><code>MOZ_DISABLE_PANGO=1</code></pre>
<p>at the end</p>
<h3>Tweak Firefox&#8217;s about:config settings:</h3>
<pre><code>network.http.pipelining -> True
- network.http.pipelining.maxrequests -> 8 or 10
- network.http.proxy.pipelining -> True
- network.dns.disableIPv6 -> True</code></pre>
<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/speeding-up-firefox-under-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cleaning up your boot partition with Ubuntu</title>
		<link>http://blog.al-shami.net/index.php/cleaning-up-your-boot-partition-with-ubuntu/</link>
		<comments>http://blog.al-shami.net/index.php/cleaning-up-your-boot-partition-with-ubuntu/#comments</comments>
		<pubDate>Fri, 25 Dec 2009 13:20:51 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=208</guid>
		<description><![CDATA[If you haven&#8217;t reinstalled Ubuntu in a while, the /boot partition will eventually fill up with all the updated kernels, and you&#8217;ll get an error when trying update.
At first I used to uninstall the old kernels manually but being lazy I think it&#8217;s too much work. When you get the error with update-manager or Synaptic [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t reinstalled Ubuntu in a while, the /boot partition will eventually fill up with all the updated kernels, and you&#8217;ll get an error when trying update.</p>
<p>At first I used to uninstall the old kernels manually but being lazy I think it&#8217;s too much work. When you get the error with update-manager or Synaptic try this:</p>
<pre><code>
sudo aptitude search linux -w 160 | egrep '(image|headers|restricted)' | egrep '^i' | grep -v 'KERNEL_VERSION' | grep -v -P '[^\d]-generic' | grep -v linux-restricted-modules-common | sed 's/i A/i  /' | awk '{print $2}' | xargs sudo aptitude remove
</code></pre>
<p>Replace &#8220;KERNEL_VERSION&#8221; with your currently running kernel.</p>
<p>This might break your grub configuration but update-manager will fix that for you so no need to worry. Just make sure you run this BEFORE update-manager does the update.</p>
<p>To be honest I didn&#8217;t try this without &#8220;grep -v &#8216;KERNEL_VERSION&#8217;&#8221; so I&#8217;m not sure if removing it would break something. Just leave it there to be safe.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/cleaning-up-your-boot-partition-with-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Experience with the Motorola CPEo 400 Wimax CPE</title>
		<link>http://blog.al-shami.net/index.php/my-experience-with-the-motorola-cpeo-400-wimax-cpe/</link>
		<comments>http://blog.al-shami.net/index.php/my-experience-with-the-motorola-cpeo-400-wimax-cpe/#comments</comments>
		<pubDate>Tue, 10 Nov 2009 09:05:35 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[connection]]></category>
		<category><![CDATA[connection drop]]></category>
		<category><![CDATA[cpe]]></category>
		<category><![CDATA[cpe 400]]></category>
		<category><![CDATA[cpe400]]></category>
		<category><![CDATA[cpeo]]></category>
		<category><![CDATA[cpeo 400]]></category>
		<category><![CDATA[cpeo400]]></category>
		<category><![CDATA[drop]]></category>
		<category><![CDATA[freeze]]></category>
		<category><![CDATA[lost]]></category>
		<category><![CDATA[reboot]]></category>
		<category><![CDATA[restart]]></category>
		<category><![CDATA[routing]]></category>
		<category><![CDATA[signal]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=195</guid>
		<description><![CDATA[Where I live we have no proper DSL (512Kbps max), GSM signals are weak. Sometimes I have to stick my head out of the window just to be able to make a call. Even when I got my Wimax account the indoor CPE kept disconnecting every few minutes. I finally managed to get my hands [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" title="Motorola CPEo 400" src="/images/cpeo400.jpg" alt="" width="269" height="269" />Where I live we have no proper DSL (512Kbps max), GSM signals are weak. Sometimes I have to stick my head out of the window just to be able to make a call. Even when I got my Wimax account the indoor CPE kept disconnecting every few minutes. I finally managed to get my hands on an Outdoor CPE which made things much better. Typical for someone living at the edge of the world (West Amman).</p>
<p>The Motorola CPEs act as network gateways, they connect to the Wimax network and do NATing for you. That&#8217;s nice for a home network, less stuff to configure and less clutter.</p>
<p>The indoor CPE worked well when it had coverage, but when I switched to the CPEo 400 I started running into all sorts of problems; DHCP and DNS stopped working, Connection drops, signal losses, and CPE restarts for no apparent reason.</p>
<p>Calling customer care for a week didn&#8217;t help, as you know it&#8217;s useless if your problem is a bit different. Oh believe me, Orange&#8217;s customer care is much worse, at least with Zain they tell you if they&#8217;re experiencing technical issues, with Orange it&#8217;s always your indoor wiring.</p>
<p>Turns out there are some bugs in the OS running on the CPE, I&#8217;m assuming it&#8217;s some sort of Linux distribution gone horribly wrong (Software version 02.01.90-02/11/2009). If you turn on UPnP all Hell breaks loose. I thought I should share this because of the lack of documentation and support for this particular unit.</p>
<p>You have 2 solutions, choose whichever fits your technical skills and/or your time.</p>
<p>Solution 1 (simple): This was the first one I went with, just connect the CPE to the WAN port of your aDSL router. Configure a static IP address and DNS on the router so it won&#8217;t use the CPE and use that IP as the DMZ. This will have the CPE forward all traffic to the router and have the router handle all the UPnP issues. This, however, you&#8217;d end up with double NATing, something not everybody likes.</p>
<p>Solution 2 (A bit technical): Install <a href="http://www.dd-wrt.com/site/index">dd-wrt</a> on your aDSL router and have it take of DHCP and DNS, then configure the default gateway as your CPE. You won&#8217;t have UPnP here but you can set up port forwarding on the CPE which should work fine.<a href="http://www.dd-wrt.com/site/index"></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/my-experience-with-the-motorola-cpeo-400-wimax-cpe/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>VMware remote console Firefox plug-in and arrow keys</title>
		<link>http://blog.al-shami.net/index.php/vmware-remote-console-firefox-plug-in-and-arrow-keys/</link>
		<comments>http://blog.al-shami.net/index.php/vmware-remote-console-firefox-plug-in-and-arrow-keys/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 07:11:48 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[arrow]]></category>
		<category><![CDATA[arrow keys]]></category>
		<category><![CDATA[arrows]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[firefox plug-in]]></category>
		<category><![CDATA[firefox plugin]]></category>
		<category><![CDATA[plug-in]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[remote console]]></category>
		<category><![CDATA[vmware]]></category>
		<category><![CDATA[vmware remote console]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=121</guid>
		<description><![CDATA[VMware remote console was working properly for me when I was using Ubuntu Hardy. After upgrading to Jaunty the arrow keys stopped working inside the remote console. Seems some people face this problem even under windows.
A search got me to this:
echo xkeymap.nokeycodeMap="TRUE" > ~/.vmware/config
Just close any open remote consoles and open up again and you&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>VMware remote console was working properly for me when I was using Ubuntu Hardy. After upgrading to Jaunty the arrow keys stopped working inside the remote console. Seems some people face this problem even under windows.</p>
<p>A search got me to <a href="http://communities.vmware.com/thread/198779">this</a>:</p>
<pre><code>echo xkeymap.nokeycodeMap="TRUE" > ~/.vmware/config</code></pre>
<p>Just close any open remote consoles and open up again and you&#8217;re in business.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/vmware-remote-console-firefox-plug-in-and-arrow-keys/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Lighttpd, Joomla, and clean URLs</title>
		<link>http://blog.al-shami.net/index.php/lighttpd-joomla-and-clean-urls/</link>
		<comments>http://blog.al-shami.net/index.php/lighttpd-joomla-and-clean-urls/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 11:48:26 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[clean]]></category>
		<category><![CDATA[clean url]]></category>
		<category><![CDATA[clean urls]]></category>
		<category><![CDATA[cleanurls]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[lighttpd]]></category>
		<category><![CDATA[lighty]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[urls]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=115</guid>
		<description><![CDATA[So I&#8217;m working on a new web server but I don&#8217;t want to use Apache since it&#8217;s a virtual machine. Had some trouble with the rewirte rules but I think I got them
From this forum post

$HTTP["url"] !~ "\.(gif&#124;png&#124;css&#124;jpg&#124;jpeg&#124;js)$" {
   server.error-handler-404 = "/index.php"
}

But I thought of a different approach and it seems to work [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;m working on a new web server but I don&#8217;t want to use Apache since it&#8217;s a virtual machine. Had some trouble with the rewirte rules but I think I got them</p>
<p>From <a href="http://forum.joomla.org/viewtopic.php?f=433&#038;p=1390643">this forum post</a></p>
<pre><code>
$HTTP["url"] !~ "\.(gif|png|css|jpg|jpeg|js)$" {
   server.error-handler-404 = "/index.php"
}
</code></pre>
<p>But I thought of a different approach and it seems to work so far, and maybe causes less error messages in the logs:</p>
<pre><code>
url.rewrite-once = ("^/(.*\.html)$" => "/index.php?page=$1", "^/(.*\.html\?.*)" => "/index.php?page=$1", "^/(.*/\?.*)" => "/index.php?page=$1")
</code></pre>
<p>Have a good one</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/lighttpd-joomla-and-clean-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Throttling outgoing emails to certain domains with Postfix</title>
		<link>http://blog.al-shami.net/index.php/throttling-outgoing-emails-to-certain-domains-with-postfix/</link>
		<comments>http://blog.al-shami.net/index.php/throttling-outgoing-emails-to-certain-domains-with-postfix/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 09:20:38 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Mail]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=102</guid>
		<description><![CDATA[I&#8217;ve been busy setting up a PHPlist server for my employer. All tests went ok, but as soon as we sent our first newsletter Yahoo! blocked the server. After looking around for a solution people suggested we sign all outgoing emails with DomainKeys and not hammer Yahoo&#8217;s servers with consecutive connection.
Using DomainKeys was a simple [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been busy setting up a PHPlist server for my employer. All tests went ok, but as soon as we sent our first newsletter Yahoo! blocked the server. After looking around for a solution people suggested we sign all outgoing emails with DomainKeys and not hammer Yahoo&#8217;s servers with consecutive connection.</p>
<p>Using DomainKeys was a simple setup with DKIMproxy, as for throttling, you all know Postfix is one high performance MTA, so that would be hard to do. PHPlist has a throttling feature but I didn&#8217;t want to use that because it would slow emails going to all domains and it took about half a day to send messages to about 6,000 users. That is unacceptable.</p>
<p>After some more digging around I found that Postfix 2.5 introduced the perfect solution, here you go:</p>
<p>First, add the following lines to your master.cf</p>
<pre><code>
domain1      unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
domain2      unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
domain3      unix  -       -       n       -       -       smtp
        -o smtp_fallback_relay=
</code></pre>
</p>
<p>
Now, to use those transports add these lines to your transport_maps file</p>
<pre><code>
domain1.tld    domain1:
domain2.tld    domain2:
domain3.tld    domain3:
</code></pre>
</p>
<p>
Finally, set the destination_rate_delay for those transports in main.cf</p>
<pre><code>
domain1_destination_rate_delay = 10s
domain2_destination_rate_delay = 20s
domain3_destination_rate_delay = 30s
</code></pre>
</p>
<p>This will effectively send all outgoing messages at full speed, except for messages going to domain1.tld, domain2.tld, and domain3.tld; Postfix will wait 10/20/30 seconds after sending each message to domain1.tld/domain2.tld/domain3.tld.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/throttling-outgoing-emails-to-certain-domains-with-postfix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing MySQL Error 1064 with PHPList when selecting new criteria</title>
		<link>http://blog.al-shami.net/index.php/fixing-1064-mysql-error/</link>
		<comments>http://blog.al-shami.net/index.php/fixing-1064-mysql-error/#comments</comments>
		<pubDate>Sat, 14 Mar 2009 14:48:26 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Mail]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=97</guid>
		<description><![CDATA[I&#8217;m currently experimenting with PHPlist to use for our corporate newsletters. During the tests I got the following error
Database error 1064 while doing query You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;1)&#8217; at line 3
Tracking this problem [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently experimenting with PHPlist to use for our corporate newsletters. During the tests I got the following error</p>
<p>Database error 1064 while doing query You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &#8216;1)&#8217; at line 3</p>
<p>Tracking this problem down I found the following code segment in &#8220;admin/send_core.php&#8221;</p>
<pre><code>
if (is_array($_POST["criteria_values"])) {
$values = join(", ",$_POST["criteria_values"]);
} else {
$values = $_POST["criteria_values"];
}
</code></pre>
<p>$values in this segment will always start with a comma. We just need to add a substr statement to fix that. Just change it to</p>
<pre><code>
if (is_array($_POST["criteria_values"])) {
$values = join(", ",$_POST["criteria_values"]);
} else {
$values = $_POST["criteria_values"];
}
if (substr($values, 0, 1) == ",") {
$values = substr($values, 1);
}
</code></pre>
<p>That&#8217;s it. This will remove the starting comma (If it exists)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/fixing-1064-mysql-error/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Empathy, the new kid on the block</title>
		<link>http://blog.al-shami.net/index.php/empathy-the-new-kid-on-the-block/</link>
		<comments>http://blog.al-shami.net/index.php/empathy-the-new-kid-on-the-block/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 07:26:35 +0000</pubDate>
		<dc:creator>Mohammad Al-Shami</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.al-shami.net/?p=69</guid>
		<description><![CDATA[If you&#8217;ve used Linux as a desktop, you&#8217;ll know it&#8217;s only playing catch-up when it comes to instant messaging. I&#8217;ve been using Pidgin since was called Gaim, I think I started using it back in 2003. I love how minimalistic it is. Sadly the developers are going nowhere with it, at least that&#8217;s my (as [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve used Linux as a desktop, you&#8217;ll know it&#8217;s only playing catch-up when it comes to instant messaging. I&#8217;ve been using Pidgin since was called Gaim, I think I started using it back in 2003. I love how minimalistic it is. Sadly the developers are going nowhere with it, at least that&#8217;s my (as well as a few others) humble opinion.</p>
<p>I stumbled upon <a href="http://ubuntuforums.org/showthread.php?t=876847">this post</a> which mentions a new (or maybe just new to me) client called <a href="http://live.gnome.org/Empathy">Empathy</a>. After playing with it for a few days now I think it has great potential. It&#8217;s still pretty basic but also under heavy development. It&#8217;s very minimalistic and uses the Telepathy library, which IMHO is a better approach than Pidgin&#8217;s libpurple.</p>
<p>It still doesn&#8217;t have proxy support, but you can work around that, at least for MSN and Gtalk, the protocols that I use. Here is how I did it it:</p>
<p>Gtalk: Just create a tunnel with SSH</p>
<pre>
<code>
ssh -C -q -f -M 0 -N -L 5223:209.85.137.125:5223
</code>
</pre>
<p>Where 209.85.137.125 is the IP address of talk.google.com, then set the account to use localhost as a server</p>
<p>MSN is a little different, this trick didn&#8217;t work because the client connects to a login server, which redirects the client to a different server. MSN is implemented using the telepathy-butterfly executable. Just use a socks server like this:</p>
<pre>
<code>
mv /usr/lib/telepathy/telepathy-butterfly /usr/lib/telepathy/telepathy-butterfly-old
vi /usr/lib/telepathy/telepathy-butterfly

#!/bin/bash
exec /usr/bin/tsocks /usr/lib/telepathy/telepathy-butterfly-old

chmod +x /usr/lib/telepathy/telepathy-butterfly
</code>
</pre>
<p>Enjoy <img src='http://blog.al-shami.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.al-shami.net/index.php/empathy-the-new-kid-on-the-block/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
