<?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>Ali Gangji</title>
	<atom:link href="http://aligangji.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://aligangji.com/blog</link>
	<description>Open, Standards Based Computing and Web Development</description>
	<lastBuildDate>Sat, 20 Mar 2010 03:58:25 +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>Wordpress Automatic Installer Shell Script</title>
		<link>http://aligangji.com/blog/2010/03/wordpress-automatic-installer-shell-script/</link>
		<comments>http://aligangji.com/blog/2010/03/wordpress-automatic-installer-shell-script/#comments</comments>
		<pubDate>Sat, 20 Mar 2010 03:54:25 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=66</guid>
		<description><![CDATA[Today I&#8217;m going to share with you a little script to automate installing Wordpress. This is a standalone shell script that will download the latest version of wordpress and configure it for you.
First of all, here is the script.

This script will download the latest version of wordpress and extract it to the directory you specify. [...]]]></description>
			<content:encoded><![CDATA[<p>Today I&#8217;m going to share with you a little script to automate installing Wordpress. This is a standalone shell script that will download the latest version of wordpress and configure it for you.<br />
First of all, here is the script.<br />
<script src="http://gist.github.com/338462.js?file=wordpress"></script><br />
This script will download the latest version of wordpress and extract it to the directory you specify. It will then create a wp-config.php file and configure it for you. Just run the script and then visit wp-admin/install.php on the new installation.</p>
<h3>Usage</h3>
<p><code><strong>$</strong> wordpress install_dir -u dbuser -p dbpass -d dbname</code></p>
<h3>Options</h3>
<ul>
<li>-u dbuser         Database username</li>
<li>-p dbpass         Database password</li>
<li>-d dbname         Database name</li>
<li>-h dbhost         Database host</li>
<li>&#8211;private         Hide blog from search engines</li>
<li>&#8211;prefix prefix   Database prefix</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2010/03/wordpress-automatic-installer-shell-script/feed/</wfw:commentRss>
		<slash:comments>22</slash:comments>
		</item>
		<item>
		<title>A clean and easy cross-browser CSS dropdown menu</title>
		<link>http://aligangji.com/blog/2010/03/a-clean-and-easy-cross-browser-css-dropdown-menu/</link>
		<comments>http://aligangji.com/blog/2010/03/a-clean-and-easy-cross-browser-css-dropdown-menu/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 03:37:55 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[CSS techniques]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=31</guid>
		<description><![CDATA[Everybody needs a portable CSS dropdown menu in their bag of tricks. It&#8217;s not difficult to build a dropdown menu, but i&#8217;m lazy. This way I have a re-usable cross browser solution. Even your mom can&#8217;t argue with that.
First, I will say a word about getting the dropdown to work in Internet Explorer 6. IE [...]]]></description>
			<content:encoded><![CDATA[<p>Everybody needs a portable CSS dropdown menu in their bag of tricks. It&#8217;s not difficult to build a dropdown menu, but i&#8217;m lazy. This way I have a re-usable cross browser solution. Even your mom can&#8217;t argue with that.</p>
<p>First, I will say a word about getting the dropdown to work in Internet Explorer 6. IE 6 does not support the <em>:hover</em> sudo-class on <strong>li</strong> tags. There are two solutions to this problem. Both behaviors only occur when the user visits with IE 6 or lower.</p>
<ol>
<li>Use javascript to simulate the <em>:hover</em> sudo-class with a regular class.</li>
<li>Nest dropdowns inside of a table and inside the parent anchor tag .</li>
</ol>
<p>I will use the first solution. It keeps the HTML and the CSS cleaner. I am ok with the javascript since it will only be run on IE 6 and lower.</p>
<p>Here is the HTML structure of the dropdown. I have imported the CSS at the top, but I suggest that you include with a link tag in the head of your page.<br />
<script src="http://gist.github.com/321266.js?file=dropdown.html"></script> Here is the CSS: <script src="http://gist.github.com/321266.js?file=dropdown.css"></script><br />
Lastly, the javascript bit for IE 6:<br />
<script src="http://gist.github.com/321266.js?file=dropdown.js"></script></p>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2010/03/a-clean-and-easy-cross-browser-css-dropdown-menu/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Installing Adobe Flex Builder for Linux on Arch Linux x64</title>
		<link>http://aligangji.com/blog/2010/02/installing-adobe-flex-builder-linux-on-archlinux-64-bit/</link>
		<comments>http://aligangji.com/blog/2010/02/installing-adobe-flex-builder-linux-on-archlinux-64-bit/#comments</comments>
		<pubDate>Mon, 15 Feb 2010 09:43:58 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[free software]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=42</guid>
		<description><![CDATA[As you probably know if you are reading this, Adobe Labs has a Flex Builder alpha available for linux. Unfortunately, Flex builder for Linux is 32-bit so running it on Arch Linux or any other 64-bit Linux distro requires 32-bit versions of the JRE, Eclipse, and Firefox. Thankfully, you can find the JRE and Firefox [...]]]></description>
			<content:encoded><![CDATA[<p>As you probably know if you are reading this, Adobe Labs has a Flex Builder alpha available for linux. Unfortunately, Flex builder for Linux is 32-bit so running it on <a href="http://www.archlinux.org/" target="_blank">Arch Linux</a> or any other 64-bit Linux distro requires 32-bit versions of the JRE, Eclipse, and Firefox. Thankfully, you can find the JRE and Firefox on the AUR (Arch User Repository). The easiest way to install packages from the AUR is with yaourt <a href="http://wiki.archlinux.org/index.php/Yaourt" target="_blank">yaourt</a>. Yaourt is a wrapper for <a href="http://wiki.archlinux.org/index.php/Pacman" target="_blank">pacman</a>. It works just like pacman but &#8220;it adds seamless access to the AUR&#8221;. The name is awkward but that&#8217;s why God created the alias command. If it bothers you that much (I don&#8217;t see any other reason not to use it), you can use the <a href="http://wiki.archlinux.org/index.php/AUR_User_Guidelines" target="_blank">AUR User Guidelines</a> to install it with pacman. I used Yaourt and these are the steps I followed:</p>
<ol>
<li>First we need the 32-bit Java Runtime Environment. Install <strong><a href="http://aur.archlinux.org/packages.php?ID=18646" target="_blank">bin32-jre</a></strong> from the AUR.<br />
<code><strong>$</strong> yaourt -S bin32-jre</code></li>
<li>Do the same for <strong><a href="http://aur.archlinux.org/packages.php?ID=18644" target="_blank">firefox32</a></strong>.<br />
<code><strong>$</strong> yaourt -S firefox32</code></li>
<li>Download one of the <a href="http://www.eclipse.org/downloads/packages/release/europa/winter" target="_blank">eclipse europa packages</a> and extract it to the location you would like eclipse to be installed. I extracted it to <strong>/opt/eclipse32</strong>. Now don&#8217;t go getting a newer version. As of this writing Flex builder for Linux does not work with newer versions of Eclipse.</li>
<li>In your eclipse directory (the folder you just extracted), edit <strong>eclipse.ini</strong> and add the following line after the <em>org.eclipse.platform</em> line.<br />
<code>-vm /opt/bin32-jre/</code></li>
<li>In the same folder, create a file called <strong>eclipse.sh</strong>. Enter the following. If you have used different directories, then be sure to change these to your own.<br />
<script src="http://gist.github.com/318179.js?file=eclipse.sh"></script></li>
<li>Now source the file to make sure that eclipse works and to set up the environment for the Flex Builder installer.<br />
<code><strong>$</strong> source eclipse.sh</code></li>
<li>Download run the Flex Builder for Linux installer. I installed Flex Builder at <strong>/opt/Flex</strong>. If you install it somewhere different, be sure to update the <strong>eclipse.sh</strong> you created.<br />
<code><strong>$</strong> sh flexbuilder_linux_install_a5_112409.bin</code></li>
<li>Copy the <strong>libflashplayer.so</strong> from the Flex installation to your firefox32 plugins folder.<br />
<code><strong>$</strong> cp /opt/Flex/Player/linux/install_flash_player_9_linux/libflashplayer.so /opt/firefox32/plugins/</code></li>
<li>Edit <strong>Adobe_Flex_builder.sh</strong> in the Flex Builder directory. At the very bottom, change <em>eclipse</em> to eclipse.sh.<br />
<code>"${ECLIPSE_LOCATION}"/eclipse.sh -vmargs -Xmx512M</code></li>
</ol>
<p>Now you can run <strong>/opt/Flex/Adobe_Flex_builder.sh</strong> to start Flex Builder for Linux! I think this and SWFTools are the best Flash authoring options that we&#8217;ll have on Linux for a while to come. So if you&#8217;re waiting for a better solution from Adobe, don&#8217;t hold your breath. It is quite miraculous that Adobe actually went through the effort. If only they were willing to finish the job!</p>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2010/02/installing-adobe-flex-builder-linux-on-archlinux-64-bit/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>Why I use free and open software</title>
		<link>http://aligangji.com/blog/2009/06/why-i-use-free-and-open-software/</link>
		<comments>http://aligangji.com/blog/2009/06/why-i-use-free-and-open-software/#comments</comments>
		<pubDate>Sat, 13 Jun 2009 04:56:56 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[free software]]></category>
		<category><![CDATA[ethics]]></category>
		<category><![CDATA[freedom]]></category>
		<category><![CDATA[open source]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=29</guid>
		<description><![CDATA[This is by no means comprehensive, but I wanted to quickly outline my reasons for staying away from proprietary software and sticking to free and open source software. My reasons are both technical as well as ethical.
Proprietary software products are specialized consumer products. They employ a systemic division between user and developer. There is no [...]]]></description>
			<content:encoded><![CDATA[<p>This is by no means comprehensive, but I wanted to quickly outline my reasons for staying away from proprietary software and sticking to free and open source software. My reasons are both technical as well as ethical.</p>
<p>Proprietary software products are specialized consumer products. They employ a systemic division between <em><strong>user</strong></em> and <em><strong>developer</strong></em>. There is no such distiction with free and open software. The users <strong>are</strong> the developers, and the developers <strong>are</strong> the users.Â  Consequently, proprietary software is very restrictive and uncontrollable.</p>
<p>A common manifestation of this division is closed source releases. This makes you more susceptible to bugs, and completely vulnerable to malware. It also devoids the product of educational value. On the contrary, open source software often benifits from public rigor to achieve superior stability, security and performance. This also leaves you free to modify the program to suit your needs.</p>
<p>Propreitary software licenses restrict you from sharing the software. I consider this unethical simply on the grounds of free speech. Software is simply information. You cannot convey to me a piece of information and still own it.Â  These restrictions are also morally corruptive to society. Combined with closed source, this also prevents collaboration and learning.</p>
<p>Proprietary software also breeds dependence. They employ techniques such as using secret formats and conspire with eachother to keep you stuck with certain technologies. This is why formats like MP3 and DVD are in standard use. Not because they have any technological benefit, but because the proprietors have conspired to keep themselves getting paid. Open source developers are not motivated by money, they are motivated by the software. That&#8217;s what I want. I don&#8217;t want software designed to restrict me and make someone else money while also having some functionality. I want software that every ounce of was designed for functionality and freedom. Every ounce.</p>
<p>Most importantly, linux is just a kick ass operating system that is utterly unparalleled. It&#8217;s just amazing. I could not live without it!</p>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2009/06/why-i-use-free-and-open-software/feed/</wfw:commentRss>
		<slash:comments>21</slash:comments>
		</item>
		<item>
		<title>Convert FLAC files to MP3 with flac and lame</title>
		<link>http://aligangji.com/blog/2009/05/convert-flac-files-to-mp3-with-flac-and-lame/</link>
		<comments>http://aligangji.com/blog/2009/05/convert-flac-files-to-mp3-with-flac-and-lame/#comments</comments>
		<pubDate>Tue, 05 May 2009 02:16:57 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[flac]]></category>
		<category><![CDATA[lame]]></category>
		<category><![CDATA[mp3]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=26</guid>
		<description><![CDATA[Flac files are just dandy, and I&#8217;m happy to use them. Sometimes, however, you might need mp3 files instead. Particularly if a friend of yours asks you to make him an mp3 cd out of some albums you only have in FLAC format. So what to do? well it&#8217;s easy enough to do from the [...]]]></description>
			<content:encoded><![CDATA[<p>Flac files are just dandy, and I&#8217;m happy to use them. Sometimes, however, you might need mp3 files instead. Particularly if a friend of yours asks you to make him an mp3 cd out of some albums you only have in FLAC format. So what to do? well it&#8217;s easy enough to do from the command line, provided you have flac and lame installed.</p>
<p>first create a file called <strong>flac2mp3</strong> somewhere in your path.<br />
copy the following into it:<br />
<code><br />
#!/bin/bash<br />
FLAC=$1<br />
MP3="${FLAC%.flac}.mp3"<br />
[ -r "$FLAC" ] || { echo can not read file \"$FLAC\" >&#038;1 ; exit 1 ; } ;<br />
metaflac --export-tags-to=- "$FLAC" | sed 's/=\(.*\)/="\1"/' >tmp.tmp<br />
cat tmp.tmp<br />
. ./tmp.tmp<br />
rm tmp.tmp<br />
flac -dc "$FLAC" | lame -b 192 -h --tt "$Title" \<br />
--tn "$Tracknumber" \<br />
--tg "$Genre" \<br />
--ty "$Date" \<br />
--ta "$Artist" \<br />
--tl "$Album" \<br />
--add-id3v2 \<br />
- "$MP3"<br />
</code></p>
<p>Now just enter the directory with your flac files and run the following:<br />
<code><br />
for file in *.flac; do $(flac2mp3 "$file"); done<br />
</code></p>
<p>That&#8217;s it! wasn&#8217;t that easy? good ol&#8217; &#8216;nix.</p>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2009/05/convert-flac-files-to-mp3-with-flac-and-lame/feed/</wfw:commentRss>
		<slash:comments>42</slash:comments>
		</item>
		<item>
		<title>ImageMagick: Join images together on the command line with ImageMagick</title>
		<link>http://aligangji.com/blog/2009/03/imagemagick-join-images-together-on-the-command-line-with-imagemagick/</link>
		<comments>http://aligangji.com/blog/2009/03/imagemagick-join-images-together-on-the-command-line-with-imagemagick/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 06:40:24 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[command line]]></category>
		<category><![CDATA[images]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=18</guid>
		<description><![CDATA[Turns out it is pretty easy to join images together. This is especially useful for joining together a button image and it&#8217;s rollover state.
Here, I want to join together the images portfolio.png and portfolio_over.png



The command we will use is montage. It is part of ImageMagick. Our command will look like this:
$ montage [inputs] [options] [output]
We [...]]]></description>
			<content:encoded><![CDATA[<p>Turns out it is pretty easy to join images together. This is especially useful for joining together a button image and it&#8217;s rollover state.<br />
Here, I want to join together the images <em>portfolio.png</em> and <em>portfolio_over.png</em><br />
<span id="more-18"></span><br />
<img src="http://ali.spucket.com/public/images/portfolio.png" alt="portfolio.png" title="portfolio.png" /><br />
<img src="http://ali.spucket.com/public/images/portfolio_over.png" alt="portfolio_over.png" title="portfolio_over.png" /></p>
<p>The command we will use is <em>montage</em>. It is part of ImageMagick. Our command will look like this:<br />
<code>$ montage [inputs] [options] [output]</code><br />
We know our two input images that we&#8217;d like to join together, so we can pop those in, and we&#8217;ll call the output <em>portfolio_button.png</em>.<br />
<code>$ montage portfolio.png portfolio_over.png [options] portfolio_button.png</code><br />
We will need two options to accomplish our goals, <em>-tile</em> and <em>-geometry</em>. First let&#8217;s take a look at the dimensions of our images.<br />
<code>$ file portfolio.png<br />
portfolio.png: PNG image, 422 x 123, 8-bit...<br />
$ file portfolio_over.png<br />
portfolio_over.png: PNG image, 422 x 123, 8-bit...</code><br />
you can see that both images are 422&#215;123. I want one on top of the other, as above.<br />
To join the images together in this orientation I&#8217;ll use <em>-tile 1&#215;2</em>. That&#8217;s 1 row and 2 columns of tiles.<br />
I want a tile to be the same size as one of the images and I don&#8217;t want any padding, so I&#8217;ll use <em>-geometry 422&#215;123</em>. If i wanted a 1 pixel padding I would use <em>-geometry 422&#215;123+1+1</em>.<br />
Here is the final command:<br />
<code>$ montage portfolio.png portfolio_over.png -tile 1x2 -geometry 422x123 portfolio_button.png</code><br />
That is all. One fairly simple command that utilizes ImageMagick to join images together on the command line.<br />
<img src="http://ali.spucket.com/public/images/portfolio_button.png" alt="portfolio_button.png" title="portfolio_button.png" /><br />
confirm that the new file <em>portfolio_button.png</em> has the correct dimensions of 422&#215;246.<br />
<code>$ file portfolio_button.png<br />
portfolio_button.png: PNG image, 422 x 246, 16-bit...</code></p>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2009/03/imagemagick-join-images-together-on-the-command-line-with-imagemagick/feed/</wfw:commentRss>
		<slash:comments>20</slash:comments>
		</item>
		<item>
		<title>Code highlighting colors for Geany</title>
		<link>http://aligangji.com/blog/2009/03/code-highlighting-colors-for-geany/</link>
		<comments>http://aligangji.com/blog/2009/03/code-highlighting-colors-for-geany/#comments</comments>
		<pubDate>Tue, 24 Mar 2009 03:40:30 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[free software]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[geany]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=7</guid>
		<description><![CDATA[If you&#8217;re anything like me, you love Geany for its super fast loading and restoring open tabs. However, I really didn&#8217;t like the highlighting colors. I used to use Kdevelop, and I enjoy Kate&#8217;s colors for web code so here I&#8217;ve made some filedefs for geany to get Kate like colors for XML, CSS, JS, [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re anything like me, you love <a title="Geany" href="http://www.geany.org" target="_blank">Geany</a> for its super fast loading and restoring open tabs. However, I really didn&#8217;t like the highlighting colors. I used to use Kdevelop, and I enjoy Kate&#8217;s colors for web code so here I&#8217;ve made some filedefs for geany to get Kate like colors for XML, CSS, JS, and PHP.<br />
<span id="more-7"></span><br />
here is a screenshot of some HTML, JS and a bit of PHP</p>
<p><a href="http://aligangji.com/blog/wp-content/uploads/2009/03/xmljs1.png" rel="shadowbox[post-7];player=img;"><img class="alignnone size-full wp-image-10" title="xmljs1" src="http://aligangji.com/blog/wp-content/uploads/2009/03/xmljs1.png" alt="" width="350" height="235" /></a></p>
<p>here&#8217;s css:</p>
<p><a href="http://aligangji.com/blog/wp-content/uploads/2009/03/css.png" rel="shadowbox[post-7];player=img;"><img class="alignnone size-full wp-image-9" title="css" src="http://aligangji.com/blog/wp-content/uploads/2009/03/css.png" alt="" width="350" height="140" /></a></p>
<p>and here are the files:</p>
<p><a href="http://aligangji.com/blog/wp-content/uploads/2009/03/filetypes.xml">geany XML filedef</a></p>
<p><a href="http://aligangji.com/blog/wp-content/uploads/2009/03/filetypes.css">geany CSS filedef</a></p>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2009/03/code-highlighting-colors-for-geany/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>We&#8217;re live</title>
		<link>http://aligangji.com/blog/2009/03/were-live/</link>
		<comments>http://aligangji.com/blog/2009/03/were-live/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 02:23:23 +0000</pubDate>
		<dc:creator>Ali Gangji</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://aligangji.com/blog/?p=5</guid>
		<description><![CDATA[aligangji.com is now officially re-released. Much better than before, now with multiple pages and a blog. A real post will be coming soon.
]]></description>
			<content:encoded><![CDATA[<p>aligangji.com is now officially re-released. Much better than before, now with multiple pages and a blog. A real post will be coming soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://aligangji.com/blog/2009/03/were-live/feed/</wfw:commentRss>
		<slash:comments>81</slash:comments>
		</item>
	</channel>
</rss>

