<?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>zaid:/dev/random</title>
	<atom:link href="http://zaid.amireh.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://zaid.amireh.net</link>
	<description>Random geeky ramblings depending on current entropy.</description>
	<lastBuildDate>Wed, 07 Sep 2011 12:25:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Integrating libevent2.</title>
		<link>http://zaid.amireh.net/2011/09/07/integrating-libevent2/</link>
		<comments>http://zaid.amireh.net/2011/09/07/integrating-libevent2/#comments</comments>
		<pubDate>Wed, 07 Sep 2011 12:24:40 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=108</guid>
		<description><![CDATA[We have used libevent2 in one of our projects, I must admit I&#8217;m impressed by its performance and ease of use, what could have taken us a couple of weeks to implement only took a couple of days using libevent2. Now comes the issue of packaging and shipping our product, we realized that linking libevent2 [...]]]></description>
			<content:encoded><![CDATA[<p>We have used <a href="http://monkey.org/~provos/libevent/">libevent2</a> in one of our projects, I must admit I&#8217;m impressed by its performance and ease of use, what could have taken us a couple of weeks to implement only took a couple of days using libevent2.</p>
<p>Now comes the issue of packaging and shipping our product, we realized that linking libevent2 statically with our binary was the most ideal solution since the license allows for it anyway.</p>
<p>We use <a href="http://cmake.org">CMake</a> to build our products and libevent2 uses autotools, trying to build libevent2 with a custom CMake script as listed <a href="http://www.mail-archive.com/libevent-users@monkey.org/msg01641.html">in this thread</a> was a real PITA and it didn&#8217;t work out, it turns out that building it using autotools invoked from CMake was trivial, the only catch is that you need version 2.8.0+ of CMake and 2.8.3+ on Mac OS X for it to work.</p>
<p>Extract the libevent2 source to a directory in your project tree, I chose srclib/libevent , then add the following to your top level CMakeLists.txt</p>
<p><code>include(ExternalProject)<br />
ExternalProject_Add(<br />
  libevent<br />
  SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/srclib/libevent<br />
  CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/srclib/libevent/configure<br />
  PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/srclib/libevent<br />
  BUILD_COMMAND make<br />
  BUILD_IN_SOURCE 1<br />
)<br />
</code></p>
<p>now when it comes to linking, I used the following when building the binary, where &#8216;tumbak&#8217; is the binary</p>
<p><code><br />
target_link_libraries(tumbak ${PROJECT_SOURCE_DIR}/srclib/libevent/.libs/libevent.a)<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2011/09/07/integrating-libevent2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bush -Letting The Cables Sleep (N.O.W Remix)</title>
		<link>http://zaid.amireh.net/2011/04/10/bush-letting-the-cables-sleep-n-o-w-remix/</link>
		<comments>http://zaid.amireh.net/2011/04/10/bush-letting-the-cables-sleep-n-o-w-remix/#comments</comments>
		<pubDate>Sun, 10 Apr 2011 12:28:18 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Music]]></category>
		<category><![CDATA[chillout]]></category>
		<category><![CDATA[music]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=103</guid>
		<description><![CDATA[This is one of the most amazing chillout songs I&#8217;ve listened to =)]]></description>
			<content:encoded><![CDATA[<p>This is one of the most amazing chillout songs I&#8217;ve listened to =)</p>
<p><iframe title="YouTube video player" width="550" height="320" src="http://www.youtube.com/embed/6-t1a_pzVKQ" frameborder="0" allowfullscreen></iframe></p>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2011/04/10/bush-letting-the-cables-sleep-n-o-w-remix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hacking History &amp; Introduction Presentation</title>
		<link>http://zaid.amireh.net/2011/01/05/hacking-history-introduction-presentation/</link>
		<comments>http://zaid.amireh.net/2011/01/05/hacking-history-introduction-presentation/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 12:27:11 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Locals]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=94</guid>
		<description><![CDATA[This is the presentation that I made on the 4th of Jan 2011 for AmmanTT Hacking Edition. .prezi-player { width: 550px; } .prezi-player-links { text-align: center; } Hacking History &#038; Introduction on Prezi]]></description>
			<content:encoded><![CDATA[<p>This is the presentation that I made on the 4th of Jan 2011 for <a title="AmmanTT" href="http://www.ammantt.com">AmmanTT</a> Hacking Edition.</p>
<div class="prezi-player">
<style type="text/css" media="screen">.prezi-player { width: 550px; } .prezi-player-links { text-align: center; }</style>
<p><object id="prezi_lfowpklcc243" name="prezi_lfowpklcc243" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="550" height="400"><param name="movie" value="http://prezi.com/bin/preziloader.swf"/><param name="allowfullscreen" value="true"/><param name="allowscriptaccess" value="always"/><param name="bgcolor" value="#ffffff"/><param name="flashvars" value="prezi_id=lfowpklcc243&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0"/><embed id="preziEmbed_lfowpklcc243" name="preziEmbed_lfowpklcc243" src="http://prezi.com/bin/preziloader.swf" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="550" height="400" bgcolor="#ffffff" flashvars="prezi_id=lfowpklcc243&amp;lock_to_path=0&amp;color=ffffff&amp;autoplay=no&amp;autohide_ctrls=0"></embed></object>
<div class="prezi-player-links">
<p><a title="A brief glimpse into the historical evolution of the hacking culture and its associated terms." href="http://prezi.com/lfowpklcc243/hacking-history-introduction/">Hacking History &#038; Introduction</a> on <a href="http://prezi.com">Prezi</a></p>
</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2011/01/05/hacking-history-introduction-presentation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Purging Old ActiveRecord Sessions.</title>
		<link>http://zaid.amireh.net/2010/10/12/purging-old-activerecord-sessions/</link>
		<comments>http://zaid.amireh.net/2010/10/12/purging-old-activerecord-sessions/#comments</comments>
		<pubDate>Tue, 12 Oct 2010 08:12:41 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=80</guid>
		<description><![CDATA[Using ActiveRecord::SessionStore has many benefits but the darwback is that sessions&#8217; data can build up in the table resulting in 10,000+ entries if the application is moderately used, the easiest way to delete old stale sessions is by using the following code snippet. class SessionCleaner def self.remove_stale_sessions ActiveRecord::SessionStore::Session.destroy_all( ['updated_at &#60;?', 3.hour.ago] ) end end Stick [...]]]></description>
			<content:encoded><![CDATA[<p>Using ActiveRecord::SessionStore has many benefits but the darwback is that sessions&#8217; data can build up in the table resulting in 10,000+ entries if the application is moderately used, the easiest way to delete old stale sessions is by using the following code snippet.</p>
<pre>
class SessionCleaner
  def self.remove_stale_sessions
    ActiveRecord::SessionStore::Session.destroy_all( ['updated_at &lt;?', 3.hour.ago] )
  end
end
</pre>
<p>Stick this code in a file called sessions_cleaner.rb in your /lib folder and execute is using the runner script, you can also schedule it using crontab, make sure you give it the full path though</p>
<pre>
script/runner -e production "SessionCleaner.remove_stale_sessions"
</pre>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2010/10/12/purging-old-activerecord-sessions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding Google Analytics Charts Into A Rails App</title>
		<link>http://zaid.amireh.net/2010/09/27/embedding-google-analytics-charts-into-a-rails-app/</link>
		<comments>http://zaid.amireh.net/2010/09/27/embedding-google-analytics-charts-into-a-rails-app/#comments</comments>
		<pubDate>Mon, 27 Sep 2010 12:32:41 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=67</guid>
		<description><![CDATA[It is a straight forward operation to be honest, it took much reading and much less code to get it done, hope this saves some other folks some time. This is how it&#8217;s gonna look like in the end Trying to connect to communicate to the google analytics API is a bit tricky and takes [...]]]></description>
			<content:encoded><![CDATA[<p>It is a straight forward operation to be honest, it took much reading and much less code to get it done, hope this saves some other folks some time.</p>
<p>This is how it&#8217;s gonna look like in the end</p>
<p><a href="http://zaid.amireh.net/wp-content/uploads/2010/09/Screen-shot-2010-09-27-at-3.21.18-PM.png"><img class="alignnone size-full wp-image-74" title="Highcharts" src="http://zaid.amireh.net/wp-content/uploads/2010/09/Screen-shot-2010-09-27-at-3.21.18-PM.png" alt="highcharts" width="546" height="411" /></a></p>
<p><span id="more-67"></span>Trying to connect to communicate to the google analytics API is a bit tricky and takes some time to get it right, you have to use HTTP headers and what-not, I went through this route first thinking that there weren&#8217;t any Ruby gems to do, guess I was mistaken.</p>
<p>The gem that suited my needs is <a href="http://github.com/vigetlabs/garb/">garb</a>, pretty decent but you would still have to read the wiki to understand how it works.</p>
<p>First establish a new sessions and bind to the profile that you want</p>
<pre>Garb::Session.login('email@example.com', 'password', :account_type =&gt; 'GOOGLE_OR_HOSTED')
profile = Garb::Profile.first('UA-XXXXXXXX-X')</pre>
<p>I have also declared a class so I can get the reports I want filtered by URL</p>
<pre>class ViewsVisits
    extend Garb::Resource
    metrics :visits, :page_views
    dimensions :date
    @@path = ''
    def ViewsVisits.path
      @@path
    end
    def ViewsVisits.path=(value)
      @@path = value
    end

    filters do
      matches(:page_path, "#{@@path}")
    end
  end</pre>
<p>I then iterate over the entities that I want to get the stats for</p>
<pre>    @entities = []
    @entities.concat(Restaurant.published)
    @entities.each do |e|
      ViewsVisits.path = "/" + e.class.to_s.pluralize.underscore + "/" + e.id.to_s
      report = ViewsVisits.results(profile, :start_date =&gt; (Date.today - 31),:end_date =&gt; (Date.today - 1) )
      #save the result in the DB for latter processing
    end</pre>
<p>All good so far, remember to serialize the column into which you plan to save report.</p>
<p>Now lets head into generating a nice little chart for this data, I decided to go with <a href="http://www.highcharts.com/">Highcharts</a>, first lets parse the data into array where @pvarray is for page views and @varray is for visits.</p>
<pre>      @pvarray = []
      @varray = []
      @entity.info.views_stats.each do |r|
        @pvarray &lt;&lt; r.pageviews
        @varray &lt;&lt; r.visits
      end</pre>
<p>and the following Javascript should render this data in a lovely fashion</p>
<pre>&lt;script type="text/javascript"&gt;

  	var chart;
  	$j(document).ready(function() {
  		chart = new Highcharts.Chart({
  			chart: {
  				renderTo: 'container',
  				defaultSeriesType: 'area'
  			},
  			title: {
  				text: 'Views and Visits over the last 30 days'
  			},
  			xAxis: {
  			  type: "datetime"
  			},
  			yAxis: {
  			  type: "linear",
  			  title: "pew",
  			  min: 0,
  				labels: {
  				  enabled: false
  				}
  			},
  			tooltip: {
  				formatter: function() {
  					return this.series.name +':&lt;b&gt;'+ Highcharts.numberFormat(this.y, 0, null, ' ')+'&lt;/b&gt;';
  				}
  			},
  			plotOptions: {
  				series: {
  					pointStart: Date.UTC(&lt;%=  (Date.today - 31).strftime("%Y").to_s %&gt;, &lt;%=  (Date.today - 31).strftime("%m").to_i - 1 %&gt;, &lt;%=  (Date.today - 31).strftime("%d").to_s %&gt;),
  					pointInterval: 24 * 3600 * 1000, // one day
  				}
  			},
  			series: [{
  				name: 'Views',
  				data: [&lt;%= @pvarray.join(",").to_s %&gt;]
  			}, {
  				name: 'Visits',
  				data: [&lt;%= @varray.join(",").to_s %&gt;]
  			}]
  		});

  	});

  &lt;/script&gt;</pre>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2010/09/27/embedding-google-analytics-charts-into-a-rails-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Palyrria &#8211; Nilos Dub Desert Mix</title>
		<link>http://zaid.amireh.net/2010/09/13/palyrria-nilos-dub-desert-mix/</link>
		<comments>http://zaid.amireh.net/2010/09/13/palyrria-nilos-dub-desert-mix/#comments</comments>
		<pubDate>Mon, 13 Sep 2010 12:41:35 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[oud]]></category>
		<category><![CDATA[psychill]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=62</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="550" height="320"><param name="movie" value="http://www.youtube.com/v/LC3xkZQnwjQ?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/LC3xkZQnwjQ?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="550" height="320"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2010/09/13/palyrria-nilos-dub-desert-mix/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Handling Ajax Form Validation in Rails</title>
		<link>http://zaid.amireh.net/2010/06/30/handling-ajax-form-validation-in-rails/</link>
		<comments>http://zaid.amireh.net/2010/06/30/handling-ajax-form-validation-in-rails/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 09:45:50 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=59</guid>
		<description><![CDATA[Handling Ajax requests errors isn&#8217;t documented really well and there are many ways to accomplish this, some are simple and some are pretty darn complicated. the easiest solution I found was rendering different partials depending on the status of the save or update methods, here is a snippet def update @bid = Bid.find(params[:id]) respond_to do [...]]]></description>
			<content:encoded><![CDATA[<p>Handling Ajax requests errors isn&#8217;t documented really well and there are many ways to accomplish this, some are simple and some are pretty darn complicated.</p>
<p>the easiest solution I found was rendering different partials depending on the status of the save or update methods, here is a snippet</p>
<pre>
  def update
    @bid = Bid.find(params[:id])

    respond_to do |format|
      if @bid.update_attributes(params[:bid])
        flash[:notice] = 'Bid was successfully updated.'
        format.js { render :partial => "update" }
      else
        format.js { render :partial => "update_fail"}
      end
    end
  end
</pre>
<p>It may not be the most elegant solution but is sure simple and does what it says it does.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2010/06/30/handling-ajax-form-validation-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The state of ISPs in Jordan.</title>
		<link>http://zaid.amireh.net/2010/06/29/the-state-of-isps-in-jordan/</link>
		<comments>http://zaid.amireh.net/2010/06/29/the-state-of-isps-in-jordan/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 13:51:48 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Locals]]></category>
		<category><![CDATA[jordan]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=49</guid>
		<description><![CDATA[This is one of the most frustrating issues in Jordan (that is, to a geek ofcourse), all the ISPs suck, they literally suck your life and money out of you in exchange of a crappy service. I&#8217;ve been an ADSL user for 5 or 6 years, I don&#8217;t remember to be honest, here is my [...]]]></description>
			<content:encoded><![CDATA[<p>This is one of the most frustrating issues in Jordan (that is, to a geek ofcourse), all the ISPs suck, they literally suck your life and money out of you in exchange of a crappy service.</p>
<p>I&#8217;ve been an ADSL user for 5 or 6 years, I don&#8217;t remember to be honest, here is my take on the ISPs that I have used:</p>
<ol>
<li><a href="http://www.tedata.net/new/tedata_jordan/en/index.aspx" target="_blank">TeData</a>: they used to provide a decent service for the bucks you paid them, it was the only ISP that WoW didn&#8217;t massively lag on, I switched because their connection would drop for hours at time, the authentication would not succeed and all they did was to blame JTC, and ofcourse JTC would blame them in return, a very ugly and vicious cycle.</li>
<li><a href="http://www.sama.jo/" target="_blank">Sama Telecom</a>: their price is the lowest in the market I believe, their package of 10G per month is quite low, I believe that is their only package whether you have 128kb or 2mb, they claim that from 8PM till 8AM you can download to your hearts content, this is simply a lie, my 2mbps connection gets capped at 128kb even at night, I called to ask them why am I capped even after 8PM, they said I&#8217;m on their <em>blacklist</em>, yup, they said I download too much so I had to be put on this list so I don&#8217;t disturb the service for other users.</li>
</ol>
<p>Following are some other ISPs whom my friends and family members have used and shared their experiences:</p>
<ol>
<li>Orange: if there is one massive incompetent company then its hand-down Orange, it takes them at least 72-96 hours to resolve any issue, during this time you have no connection whatsoever, my friend decided to upgrade to their <em>double plan</em> over 2mbps, oh my he was sorry for that, it took them 3 weeks to upgrade his line, and then a massive 4 weeks just to upgrade his account, in the end it all failed miserably and they had to issue a new account for him , he got so pissed that he wanted to cancel but behold, he couldn&#8217;t get a single penny back, bearing in mind that he paid a full year in advanced, that is the only way you can get the <em>double plan.</em></li>
<li>Mada WiMAX: we use this one at the office, they claim 2.4mbps speed but the best we could get is 0.8mbps even though the tower is like 1 kilometer away from the office and signal strength is quite good, their price is not very high but I wouldn&#8217;t recommend their service because of the speed you will be getting.</li>
<li><a href="http://www.jcs.jo/index.php" target="_blank">Jordan Cable Services</a>: their connection speed is amazing, we got a 512 connection and we were delivered 512, their price is alright, no limitation whatsoever on the downloads, the only problem is that they only cover Gardens Street.</li>
</ol>
<p>If you would like to share your experiences and comments please do.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2010/06/29/the-state-of-isps-in-jordan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>متى تغضب؟</title>
		<link>http://zaid.amireh.net/2010/04/10/%d9%85%d8%aa%d9%89-%d8%aa%d8%ba%d8%b6%d8%a8%d8%9f/</link>
		<comments>http://zaid.amireh.net/2010/04/10/%d9%85%d8%aa%d9%89-%d8%aa%d8%ba%d8%b6%d8%a8%d8%9f/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 13:55:38 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Palestine]]></category>
		<category><![CDATA[شعر]]></category>
		<category><![CDATA[فلسطين]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=43</guid>
		<description><![CDATA[متى تغضب؟ د . عبد الغني بن أحمد التميمي أعيرونا مدافعَكُمْ ليومٍ&#8230; لا مدامعَكُمْ أعيرونا وظلُّوا في مواقعكُمْ بني الإسلام! ما زالت مواجعَنا مواجعُكُمْ مصارعَنا مصارعُكُمْ إذا ما أغرق الطوفان شارعنا سيغرق منه شارعُكُمْ يشق صراخنا الآفاق من وجعٍ فأين تُرى مسامعُكُمْ؟! * ** ** ألسنا إخوةً في الدين قد كنا .. وما زلنا فهل [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: right;"><span style="color: #c0c0c0;"><span style="font-size: xx-large;"><span style="font-family: Comic Sans MS;">متى تغضب؟</span></span></span></p>
<p style="text-align: right;"><span style="color: #c0c0c0;">د . عبد الغني بن أحمد  التميمي </span></p>
<p style="text-align: right;"><span style="color: #c0c0c0;"> </span></p>
<div style="text-align: right;">
<p><span style="color: #c0c0c0;">أعيرونا مدافعَكُمْ ليومٍ&#8230; لا  مدامعَكُمْ</span></p>
<p>أعيرونا وظلُّوا في مواقعكُمْ</p>
<p>بني الإسلام! ما زالت مواجعَنا مواجعُكُمْ</p>
<p>مصارعَنا مصارعُكُمْ</p>
<p>إذا ما أغرق الطوفان شارعنا</p>
<p>سيغرق منه شارعُكُمْ</p>
<p>يشق صراخنا الآفاق من وجعٍ</p>
<p>فأين تُرى مسامعُكُمْ؟!</p>
</div>
<div style="text-align: right;">
<p><span style="color: #c0c0c0;"><span id="more-43"></span></span><span style="color: #c0c0c0;">* ** **</span></p>
<p>ألسنا إخوةً في الدين قد كنا .. وما زلنا<span style="color: #c0c0c0;"><br />
</span> فهل هُنتم ، وهل هُنّا</p>
<p>أنصرخ نحن من ألمٍ ويصرخ بعضكم: دعنا؟</p>
<p>أيُعجبكم إذا ضعنا؟</p>
<p>أيُسعدكم إذا جُعنا؟</p>
<p>وما معنى بأن «قلوبكم معنا»؟</p>
<p>لنا نسبٌ بكم ـ والله ـ فوق حدودِ</p>
<p>هذي الأرض يرفعنا</p>
<p>وإنّ لنا بكم رحماً</p>
<p>أنقطعها وتقطعنا؟!</p>
<p>معاذ الله! إن خلائق الإسلام</p>
<p>تمنعكم وتمنعنا</p>
<p>ألسنا يا بني الإسلام إخوتكم؟!</p>
<p>أليس مظلة التوحيد تجمعنا؟!</p>
<p>أعيرونا مدافعَكُمْ</p>
<p>رأينا الدمع لا يشفي لنا صدرا</p>
<p>ولا يُبري لنا جُرحا</p>
<p>أعيرونا رصاصاً يخرق الأجسام</p>
<p>لا نحتاج لا رزّاً ولا قمحا</p>
<p>تعيش خيامنا الأيام</p>
<p>لا تقتات إلا الخبز والملحا</p>
<p>فليس الجوع يرهبنا ألا مرحى له مرحى</p>
<p>بكفٍّ من عتيق التمر ندفعه</p>
<p>ونكبح شره كبحاً</p>
<p>أعيرونا وكفوا عن بغيض النصح بالتسليم</p>
<p>نمقت ذلك النصحا</p>
<p>أعيرونا ولو شبراً نمر عليه للأقصى</p>
<p>أتنتظرون أن يُمحى وجود المسجد الأقصى</p>
<p>وأن نُمحى</p>
<p>أعيرونا وخلوا الشجب واستحيوا</p>
<p>سئمنا الشجب و (الردحا)</p>
<p><span style="color: #c0c0c0;"> * ** **</span></p>
<p>أخي في الله أخبرني متى تغضبْ؟</p>
<p>إذا انتهكت محارمنا</p>
<p>إذا نُسفت معالمنا ولم تغضبْ</p>
<p>إذا قُتلت شهامتنا إذا ديست كرامتنا</p>
<p>إذا قامت قيامتنا ولم تغضبْ</p>
<p>فأخبرني متى تغضبْ؟</p>
<p>إذا نُهبت مواردنا إذا نكبت معاهدنا</p>
<p>إذا هُدمت مساجدنا وظل المسجد الأقصى</p>
<p>وظلت قدسنا تُغصبْ</p>
<p>ولم تغضبْ</p>
<p>فأخبرني متى تغضبْ؟</p>
<p>عدوي أو عدوك يهتك الأعراض</p>
<p>يعبث في دمي لعباً</p>
<p>وأنت تراقب الملعبْ</p>
<p>إذا لله، للحرمات، للإسلام لم تغضبْ</p>
<p>فأخبرني متى تغضبْ؟!</p>
<p>رأيت هناك أهوالاً</p>
<p>رأيت الدم شلالاً</p>
<p>عجائز شيَّعت للموت أطفالاً</p>
<p>رأيت القهر ألواناً وأشكالاً</p>
<p>ولم تغضبْ</p>
<p>فأخبرني متى تغضبْ؟</p>
<p>وتجلس كالدمى الخرساء بطنك يملأ المكتبْ</p>
<p>تبيت تقدس الأرقام ك الأصنام فوق ملفّها تنكبْ</p>
<p>رأيت الموت فوق رؤوسنا ينصب</p>
<p>ولم تغضبْ</p>
<p>فصارحني بلا خجلٍ لأية أمة تُنسبْ؟!</p>
<p>إذا لم يُحْيِ فيك الثأرَ ما نلقى</p>
<p>فلا تتعبْ</p>
<p>فلست لنا ولا منا ولست لعالم الإنسان منسوبا</p>
<p>فعش أرنبْ ومُت أرنبْ</p>
<p>ألم يحزنك ما تلقاه أمتنا من الذلِّ</p>
<p>ألم يخجلك ما تجنيه من مستنقع الحلِّ</p>
<p>وما تلقاه في دوامة الإرهاب والقتل ِ</p>
<p>ألم يغضبك هذا الواقع المعجون بالهول ِ</p>
<p>وتغضب عند نقص الملح في الأكلِ!!</p>
<p><span style="color: #c0c0c0;"> * ** **</span></p>
<p>ألم تنظر إلى الأحجار في كفيَّ تنتفضُ</p>
<p>ألم تنظر إلى الأركان في الأقصى</p>
<p>بفأسِ القهر تُنتقضُ</p>
<p>ألست تتابع الأخبار؟ حيٌّ أنت!</p>
<p>أم يشتد في أعماقك المرضُ</p>
<p>أتخشى أن يقال يشجع الإرهاب</p>
<p>أو يشكو ويعترضُ</p>
<p>ومن تخشى؟!</p>
<p>هو الله الذي يُخشى</p>
<p>هو الله الذي يُحيي</p>
<p>هو الله الذي يحمي</p>
<p>وما ترمي إذا ترمي</p>
<p>هو الله الذي يرمي</p>
<p>وأهل الأرض كل الأرض لا والله</p>
<p>ما ضروا ولا نفعوا ، ولا رفعوا ولا خفضوا</p>
<p>فما لاقيته في الله لا تحفِل</p>
<p>إذا سخطوا له ورضوا</p>
<p>ألم تنظر إلى الأطفال في الأقصى</p>
<p>عمالقةً قد انتفضوا</p>
<p>تقول: أرى على مضضٍ</p>
<p>وماذا ينفع المضضُ؟! أتنهض طفلة العامين غاضبة</p>
<p>وصُنَّاع القرار اليوم لا غضبوا ولا نهضوا؟!</p>
<p><span style="color: #c0c0c0;"> * ** **</span></p>
<p>ألم يهززك منظر طفلة ملأت</p>
<p>مواضع جسمها الحفرُ</p>
<p>ولا أبكاك ذاك الطفل في هلعٍ</p>
<p>بظهر أبيه يستترُ</p>
<p>فما رحموا استغاثته</p>
<p>ولا اكترثوا ولا شعروا</p>
<p>فخرّ لوجهه ميْتاً</p>
<p>وخرّ أبوه يُحتضرُ</p>
<p>متى يُستل هذا الجبن من جنبَيْك والخورُ؟</p>
<p>متى التوحيد في جنبَيْك ينتصرُ؟</p>
<p>متى بركانك الغضبيُّ للإسلام ينفجرُ</p>
<p>فلا يُبقي ولا يذرُ؟</p>
<p>أتبقى دائماً من أجل لقمة عيشكَ</p>
<p>المغموسِ بالإذلال تعتذرُ؟</p>
<p>متى من هذه الأحداث تعتبرُ؟</p>
<p>وقالوا: الحرب كارثةٌ</p>
<p>تريد الحرب إعدادا</p>
<p>وأسلحةً وقواداً وأجنادا</p>
<p>وتأييد القوى العظمى</p>
<p>فتلك الحرب، أنتم تحسبون الحرب</p>
<p>أحجاراً وأولادا؟</p>
<p>نقول لهم: وما أعددْتُمُ للحرب من زمنٍ</p>
<p>أألحاناً وطبّالاً وعوّادا؟</p>
<p>سجوناً تأكل الأوطان في نهمٍ</p>
<p>جماعاتٍ وأفرادا؟</p>
<p>حدوداً تحرس المحتل توقد بيننا</p>
<p>الأحقاد إيقادا</p>
<p>وما أعددتم للحرب من زمنٍ</p>
<p>أما تدعونه فنّـا؟</p>
<p>أأفواجاً من اللاهين ممن غرّبوا عنّا؟</p>
<p>أأسلحة، ولا إذنا</p>
<p>بيانات مكررة بلا معنى؟</p>
<p>كأن الخمس والخمسين لا تكفي</p>
<p>لنصبر بعدها قرنا!</p>
<p>أخي في الله! تكفي هذه الكُرَبُ</p>
<p>رأيت براءة الأطفال كيف يهزها الغضبُ</p>
<p>وربات الخدور رأيتها بالدمّ تختضبُ</p>
<p>رأيت سواريَ الأقصى لكالأطفال تنتحبُ</p>
<p>وتُهتك حولك الأعراض في صلفٍ</p>
<p>وتجلس أنت ترتقبُ</p>
<p>ويزحف نحوك الطاعون والجربُ</p>
<p>أما يكفيك بل يخزيك هذا اللهو واللعبُ؟</p>
<p>وقالوا: كلنا عربٌ</p>
<p>سلام أيها العربُ!</p>
<p>شعارات مفرغة فأين دعاتها ذهبوا</p>
<p>وأين سيوفها الخَشَبُ؟</p>
<p>شعارات قد اتَّجروا بها دهراً</p>
<p>أما تعبوا؟</p>
<p>وكم رقصت حناجرهم</p>
<p>فما أغنت حناجرهم ولا الخطبُ</p>
<p>فلا تأبه بما خطبوا</p>
<p>ولا تأبه بما شجبوا</p>
<p><span style="color: #c0c0c0;"> * ** **</span></p>
<p>متى يا أيها الجنـديُّ تطلق نارك الحمما؟</p>
<p>متى يا أيها الجنديُّ تروي للصدور ظما؟</p>
<p>متى نلقاك في الأقصى لدين الله منتقما؟</p>
<p>متى يا أيها الإعـلام من غضب تبث دما؟</p>
<p>عقول الجيل قد سقمت</p>
<p>فلم تترك لها قيماً ولا همما</p>
<p>أتبقى هذه الأبواق يُحشى سمها دسما؟</p>
<p>دعونا من شعاراتٍ مصهينة</p>
<p>وأحجار من الشطرنج تمليها</p>
<p>لنا ودُمى</p>
<p>تترجمها حروف هواننا قمما</p>
<p><span style="color: #c0c0c0;"> * ** **</span></p>
<p>أخي في الله قد فتكت بنا علل</p>
<p>ولكن صرخة التكبير تشفي هذه العللا</p>
<p>فأصغ لها تجلجل في نواحي الأرض</p>
<p>ما تركت بها سهلاً ولا جبلا</p>
<p>تجوز حدودنا عجْلى</p>
<p>وتعبر عنوة دولا</p>
<p>تقضُّ مضاجع الغافين</p>
<p>تحرق أعين الجهلا</p>
<p>فلا نامت عيون الجُبْنِ</p>
<p>والدخلاءِ والعُمَلا</p>
<p><span style="color: #c0c0c0;"> * ** **</span></p>
<p>وقالوا: الموت يخطفكم وما عرفوا</p>
<p>بأن الموت أمنية بها مولودنا احتفلا</p>
<p>وأن الموت في شرف نطير له إذا نزلا</p>
<p>ونُتبعه دموع الشوق إن رحلا</p>
<p>فقل للخائف الرعديد إن الجبن</p>
<p>لن يمدد له أجلا</p>
<p>وذرنا نحن أهل الموت ما عرفت</p>
<p>لنا الأيام من أخطاره وجلا</p>
<p><span style="color: #c0c0c0;"> «هلا» بالموت للإسلام في الأقصى</span></p>
<p>وألف هلا</p>
<p><span style="color: #c0c0c0;"><span style="font-size: xx-large;"><span style="font-family: Comic Sans MS;">وتسألني  متى تغضبْ؟</span></span></span></p>
</div>
<p style="text-align: right;">
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2010/04/10/%d9%85%d8%aa%d9%89-%d8%aa%d8%ba%d8%b6%d8%a8%d8%9f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating from Facebook Page to WordPress.</title>
		<link>http://zaid.amireh.net/2010/03/27/migrating-from-facebook-page-to-wordpress/</link>
		<comments>http://zaid.amireh.net/2010/03/27/migrating-from-facebook-page-to-wordpress/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 16:04:01 +0000</pubDate>
		<dc:creator>Zaid B. Amireh</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://zaid.amireh.net/?p=33</guid>
		<description><![CDATA[Facebook has decided to close our group for political reasons, I&#8217;m not gonna discuss that here because its their site in the end and they can run it in whatever way they want, all we can do is become less dependent on facebook and migrate our stuff from there, from now on, I will think [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook has decided to close our <a href="http://www.facebook.com/pages/Palcreatorsmbdwn-flsynywn/109022141366">group</a> for political reasons, I&#8217;m not gonna discuss that here because its their site in the end and they can run it in whatever way they want, all we can do is become less dependent on facebook and migrate our stuff from there, from now on, I will think twice about posting any useful content on facebook and I will recommend everyone else to do just the same.</p>
<p>So we needed to pull out all the notes from the page we had, totalling 454 notes, there is no export functionality in facebook only an RSS feed that would give you the last 10 items.</p>
<p>So I found a <a href="http://theharmonyguy.com/2010/03/13/updated-guide-to-backing-up-or-exporting-your-facebook/">post</a> that shows how to use the <a href="http://developers.facebook.com/tools.php?api">API test tool</a> to query the FB database, the relevant query is</p>
<pre>
SELECT note_id, title, created_time, content FROM note WHERE uid = 0000000000
</pre>
<p>and change the uid into the id of the facebook page you want.</p>
<p>I was able to get all the notes in XML format, now in order to get those into wordpress we need to import them, here is a <a href="http://wordpress.org/support/topic/318571">post that shows a generic xml parser</a> for wordpress, I had to change the script a bit to make is understand fb&#8217;s xml format.</p>
<p>here is the file <a href='http://zaid.amireh.net/wp-content/uploads/2010/03/xmltowp.php_.txt'>xmltowp.php</a></p>
<p><em>Update: 20100402</em><br />
Now we have migrated our photo albums from facebook aswell, its a bit more complicated but hey, it works :)<br />
here are the queries for the FB API tool, first get your albums</p>
<pre>
SELECT name,aid FROM album WHERE owner = 00000000
</pre>
<p>next use the album ID to get the photos info for each album alone</p>
<pre>
SELECT pid, aid, src_big, src_big_height, src_big_width, link, caption, created, modified, object_id FROM photo WHERE aid= '00000000_00000'
</pre>
<p>now we have an XML file with all the photos info, lets get the URL and get all the files</p>
<pre>
$grep '&lt;src_big&gt;' album.xml &gt; urls
</pre>
<p>in VIM do the following substitutes on the urls file</p>
<pre>
:%s/    &lt;src_big&gt;//g
:%s/&lt;\/src_big&gt;//g
</pre>
<p>now feed the urls file to wget through the -i option.<br />
I have used the NextGEN gallery module for WordPress, using that I was able to import whole folders, the folders where wget saved all those photos. Now to get the captions of the original photos in WordPress aswell I have written a small ruby script that parses the albums.xml and generates an SQL file that you need to execute against your wordpress DB, here is the code, ugly but works</p>
<pre>
#!/usr/bin/ruby

require "rexml/document"
include REXML

file = File.new( "album.xml" )
doc = Document.new file
output = ""
doc.elements.each("*/photo") { |element|
  filename = ''
  caption = ''
  XPath.each( element, "src_big") { |src| filename = File.basename(src.text) }
  XPath.each( element, "caption") { |cap| caption = cap.text }
  output << "update wp_ngg_pictures set description = '#{caption}', alttext='#{caption}' where filename='#{filename}';\n"
}
outfile = File.new("update.sql", "w")
outfile << 'SET CHARACTER_SET_CLIENT=utf8;'
outfile << 'SET CHARACTER_SET_CONNECTION=utf8;'
outfile << 'SET CHARACTER_SET_RESULTS=utf8;'
outfile << output
</pre>
<p>hope this helps someone in need.</p>
]]></content:encoded>
			<wfw:commentRss>http://zaid.amireh.net/2010/03/27/migrating-from-facebook-page-to-wordpress/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

