<?xml version="1.0" encoding="utf-8" standalone="yes" ?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Bilal Syed Hussain</title>
    <link>https://bilalh.github.io/</link>
    <description>Recent content on Bilal Syed Hussain</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-EN</language>
    <managingEditor>bilalshussain@gmail.com (Bilal Syed Hussain)</managingEditor>
    <webMaster>bilalshussain@gmail.com (Bilal Syed Hussain)</webMaster>
    <copyright>(c) 2015 Bilal Syed Hussain.</copyright>
    <lastBuildDate>Sun, 01 Nov 2015 06:11:55 +0000</lastBuildDate>
    <atom:link href="https://bilalh.github.io/index.xml" rel="self" type="application/rss+xml" />
    
    <item>
      <title>CSPLib</title>
      <link>https://bilalh.github.io/csplib/</link>
      <pubDate>Sun, 01 Nov 2015 06:11:55 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/csplib/</guid>
      <description>&lt;p&gt;I maintain the website of CSPLib, a library of test problems for constraint solvers. The site is generated (using Python) from markdown specifications in addition to associated metadata and data files.  I also wrote most of the scripts that perform the generation.&lt;/p&gt;

&lt;p&gt;The website is located at &lt;a href=&#34;http://csplib.org&#34;&gt;http://csplib.org&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The github repository is located at &lt;a href=&#34;https://github.com/csplib/csplib&#34;&gt;https://github.com/csplib/csplib&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>gmusic-sync-rating</title>
      <link>https://bilalh.github.io/gmusic-sync-rating/</link>
      <pubDate>Sun, 01 Nov 2015 06:01:32 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/gmusic-sync-rating/</guid>
      <description>

&lt;p&gt;&lt;code&gt;gmusic-sync-rating&lt;/code&gt; is a command line tool to sync iTunes rating to google music. It supports the 5 star rating scale.&lt;/p&gt;

&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;gmusic-sync-rating&lt;/code&gt; can be installed from PyPI using pip:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ pip install gmusic-sync-rating
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;usage: gmusic-sync-ratings [-h] [--password PASSWORD] [--itunes-xml FILE]
                         [--only-rated]
                         username

positional arguments:
  username             Google music Username

optional arguments:
  -h, --help           show this help message and exit
  --password PASSWORD  Google music Password
  --itunes-xml FILE    iTunes xml file
  --only-rated         Only sync non empty ratings
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;password&#34;&gt;&lt;code&gt;--password&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;If &lt;code&gt;--password&lt;/code&gt; is not specified then &lt;code&gt;gmusic-sync-rating&lt;/code&gt; will prompt you to enter it&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gmusic-sync-rating &#39;myemail@example.com&#39;
Enter your google music password
Password:
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;only-rated&#34;&gt;&lt;code&gt;--only-rated&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;Only upload non empty rating.&lt;/p&gt;

&lt;h3 id=&#34;itunes-xml-file&#34;&gt;&lt;code&gt;--itunes-xml FILE&lt;/code&gt;&lt;/h3&gt;

&lt;p&gt;If you keep your iTunes library in an non standard location (i.e not ~/Music/iTunes/), you have specify the full path to iTunes Music Library.xml` in your iTunes folder.&lt;/p&gt;

&lt;h2 id=&#34;license&#34;&gt;License&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;gmusic-sync-rating&lt;/code&gt; is licensed under the &lt;code&gt;Apache 2.0 License&lt;/code&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Viewing .csv files on the command line</title>
      <link>https://bilalh.github.io/2015/10/31/viewing-.csv-files-on-the-command-line/</link>
      <pubDate>Sat, 31 Oct 2015 16:46:31 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2015/10/31/viewing-.csv-files-on-the-command-line/</guid>
      <description>&lt;p&gt;It can be convenient to view a &lt;code&gt;.csv&lt;/code&gt; file from the command line, when using SSH connection for example.  A basic version with no dependencies is as follows:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;function see_csv(){
    column -s, -t &amp;lt;&amp;quot;$1&amp;quot; | less --shift 2  -SN
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;with example output:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;1 seq    run_no  kind        iterations  timeout
2 12001  1       undirected  64          600
3 12002  1       nsample     64          600
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To handle blank fields we can use &lt;code&gt;sed&lt;/code&gt; to add extra spaces for use with &lt;code&gt;column&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;function see_csv(){
    cat &amp;quot;$1&amp;quot; | sed &#39;s/,,/, ,/g;s/,,/, ,/g&#39; | column -s, -t | less --shift 2 -SN
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If the &lt;code&gt;.csv&lt;/code&gt; has many columns, you change the &lt;code&gt;less&lt;/code&gt; options to the following:&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;function see_csv(){
    cat &amp;quot;$1&amp;quot; | sed &#39;s/,,/, ,/g;s/,,/, ,/g&#39; | column -s, -t | less -SN -Xs
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;So that the columns that can fit on the screen are printed, for convenience.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;❯ see_csv experiment.csv
      1 seq    run_no  kind        iterations param timeout  
      2 16001  1       undirected  64               38400            
      3 16002  1       nsample     64               38400            
      4 16003  1       undirected  64               38400            

~/Desktop/Results/
❯

~/Desktop/Results/
❯
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To access any addition columns use the arrow keys, this will cause the screen to be redrawn.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Alfred Extensions</title>
      <link>https://bilalh.github.io/2013/03/29/alfred-extensions/</link>
      <pubDate>Fri, 29 Mar 2013 00:15:21 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2013/03/29/alfred-extensions/</guid>
      <description>

&lt;p&gt;Workflows and Extensions for &lt;a href=&#34;www.alfredapp.com&#34;&gt;Alfred&lt;/a&gt; hosted on &lt;a href=&#34;https://github.com/Bilalh/AlfredExtensions&#34;&gt;https://github.com/Bilalh/AlfredExtensions&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&#34;itunes-ratings&#34;&gt;iTunes Ratings&lt;/h2&gt;

&lt;p&gt;Allows you to set the rating of the currently playing song. Support halves stars and empty ratings&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/posts/alfred_itunes.png
&#34; alt=&#34;Alfred iTunes&#34; /&gt;&lt;/p&gt;

&lt;p&gt;based off &lt;a href=&#34;https://github.com/qlassiqa/qWorkflow/tree/master/example%20workflows&#34;&gt;https://github.com/qlassiqa/qWorkflow/tree/master/example%20workflows&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&#34;toggle-extension&#34;&gt;Toggle Extension&lt;/h2&gt;

&lt;p&gt;A file action which toggles the visibility of file extensions for the selected files&lt;/p&gt;

&lt;h2 id=&#34;shellmarks&#34;&gt;Shellmarks&lt;/h2&gt;

&lt;p&gt;Allow the use of &lt;a href=&#34;https://bilalh.github.io/2012/01/14/shellmarks---terminal-directory-bookmarks/&#34;&gt;Shellmarks&lt;/a&gt;,  a shell script that allows you to save and jump to commonly used directories from Alfred.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Tagger 1.6.2</title>
      <link>https://bilalh.github.io/2012/09/22/tagger-1.6.2/</link>
      <pubDate>Sat, 22 Sep 2012 16:07:03 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2012/09/22/tagger-1.6.2/</guid>
      <description>&lt;p&gt;Tagger 1.6.2 has been released.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tagger launches much faster (now loads instantly compared with 10 seconds before).&lt;/li&gt;
&lt;li&gt;File size has been reduced by over 50%.&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Auto tagging has been rewritten in C++/Objective C instead of Ruby hence it is much faster.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;&lt;p&gt;Updated Libraries.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/downloads/Bilalh/Tagger/Tagger_1.6.2.zip&#34; title=&#34;Tagger 1.6 Binary&#34;&gt;Download Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://bilalh.github.io/projects/tagger/changelog.html
&#34; title=&#34;Tagger Changelog&#34;&gt;Full Changelog&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://bilalh.github.io/projects/tagger/
&#34; title=&#34;Tagger Project Page&#34;&gt;Project Page&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/Bilalh/tagger&#34; title=&#34;Tagger github Repository&#34;&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>MPlayer OSX Extended Release 2</title>
      <link>https://bilalh.github.io/2012/05/18/mplayer-osx-extended-release-2/</link>
      <pubDate>Fri, 18 May 2012 13:48:44 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2012/05/18/mplayer-osx-extended-release-2/</guid>
      <description>

&lt;p&gt;This is build contains all the features in the &lt;a href=&#34;https://bilalh.github.io/2011/12/20/mplayer-osx-extended-release-1/&#34;&gt;previous build&lt;/a&gt; with a few new additions.&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/downloads/Bilalh/MPlayer-OSX-Extended/MPlayer%20OSX%20Extended%20rev15-test1-build%202.zip&#34; title=&#34;MPlayer OSX Extended Binary&#34;&gt;Download Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/Bilalh/MPlayer-OSX-Extended&#34; title=&#34;MPlayer OSX Extended GitHub Repository&#34;&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&#34;new-features&#34;&gt;New Features&lt;/h2&gt;

&lt;h3 id=&#34;proxy-icons&#34;&gt;Proxy Icons&lt;/h3&gt;

&lt;p&gt;I Added a Proxy Icon when a file is playing, which  is invoke by clicking on the icon in the menu bar, this brings up the menu shown below which allows the user to open the folder the movie is placed in.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/posts/MPlayer-OSX-Extended/proxy_icon.png
&#34; alt=&#34;Proxy Icon&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;next-episode&#34;&gt;Next Episode&lt;/h3&gt;

&lt;p&gt;A menu item (Play Next Episode) that plays the next episode based on the currently playing file was added in previous build and was bound to ⌘E. This works for most formats of naming including&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;File Name 01
File_Name_1
File Name Episode 1
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;This build added an extra option to play the next episode automatically, saving the user  from clicking on the &lt;code&gt;Play Next Episode&lt;/code&gt; menu item each time.&lt;/p&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/posts/MPlayer-OSX-Extended/next_menu.png
&#34; alt=&#34;Next Menu&#34; /&gt;&lt;/p&gt;

&lt;h2 id=&#34;compatibility&#34;&gt;Compatibility&lt;/h2&gt;

&lt;p&gt;Nearly all of he features have been merged in the main repository, meaning that will no compatibility issues in the future.&lt;/p&gt;

&lt;h2 id=&#34;other-improvements&#34;&gt;Other Improvements&lt;/h2&gt;

&lt;p&gt;This build also contains other features to improve the image quality.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Pipe output from command line tools to a text editor</title>
      <link>https://bilalh.github.io/2012/04/22/pipe-output-from-command-line-tools-to-a-text-editor/</link>
      <pubDate>Sun, 22 Apr 2012 22:01:23 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2012/04/22/pipe-output-from-command-line-tools-to-a-text-editor/</guid>
      <description>&lt;p&gt;A useful feature is to pipe the result of a command such as &lt;code&gt;ls&lt;/code&gt; to a text editor. This can be done by using:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;	ls | open -f
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Using the &lt;code&gt;-a&lt;/code&gt; flag for &lt;code&gt;open&lt;/code&gt;  makes this even more useful allowing you to specify the application to open the output in e.g to open in TextMate use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;	ls | open -f -a Textmate
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>Sync iCloud Calendars on OS X Snow Leaopard</title>
      <link>https://bilalh.github.io/2012/04/15/sync-icloud-calendars-on-os-x-snow-leaopard/</link>
      <pubDate>Sun, 15 Apr 2012 04:50:10 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2012/04/15/sync-icloud-calendars-on-os-x-snow-leaopard/</guid>
      <description>

&lt;p&gt;Syncing iCloud&amp;rsquo;s Calendars on Snow Leopard is quite simple. The only information that requirement is your &lt;strong&gt;iCloud Server Number&lt;/strong&gt; which nearly always in the form &lt;strong&gt;pXX-caldav.icloud.com&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To find this number open Safari and &lt;a href=&#34;http://icloud.com/&#34;&gt;login to your iCloud&lt;/a&gt; account.&lt;/p&gt;

&lt;p&gt;Click on Calendar and then chose &lt;strong&gt;Windows —&amp;gt; Activity&lt;/strong&gt; from menu bar.&lt;/p&gt;

&lt;p&gt;In the window you should see something that is similar to this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;p01-contactsws.icloud.com/co/mecard/?dsid=1325673149
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;strong&gt;iCloud Server Number&lt;/strong&gt; is the first part of the address namely &lt;strong&gt;p01&lt;/strong&gt; in this case.&lt;/p&gt;

&lt;h2 id=&#34;syncing-ical&#34;&gt;Syncing iCal&lt;/h2&gt;

&lt;p&gt;Open iCal&amp;rsquo;s Preferences, then pick the &lt;strong&gt;Accounts Tab&lt;/strong&gt;. Click the plus sign at the bottom left.&lt;/p&gt;

&lt;p&gt;Fill in the fields with the following settings:&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&#34;left&#34;&gt;Field&lt;/th&gt;
&lt;th align=&#34;left&#34;&gt;Value&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;Account Type:&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;CalDAV&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;User name:&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;yourUserName@me.com&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;Password:&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;yourPassword&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;Server Address&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;pXX-caldav.icloud.com&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;p&gt;pXX is your &lt;strong&gt;iCloud Server Number&lt;/strong&gt; from above.&lt;/p&gt;

&lt;p&gt;Now click create create. If it asks you to pick a server choose &lt;code&gt;pXX-caldav.icloud.com&lt;/code&gt;  from the above settings.&lt;/p&gt;

&lt;p&gt;It should work now!&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Shellmarks - terminal directory bookmarks</title>
      <link>https://bilalh.github.io/2012/01/14/shellmarks---terminal-directory-bookmarks/</link>
      <pubDate>Sat, 14 Jan 2012 00:57:33 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2012/01/14/shellmarks---terminal-directory-bookmarks/</guid>
      <description>

&lt;p&gt;&lt;a href=&#34;https://bilalh.github.io/shellmarks
&#34; title=&#34;shellmarks project page&#34;&gt;shellmarks&lt;/a&gt; is a shell script that allows you to save and jump to commonly used directories.&lt;/p&gt;

&lt;h2 id=&#34;usage-example&#34;&gt;Usage Example&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ cd /var/www/
$ s web
$ cd /usr/local/bin/
$ s localbin
$ l
    web          /var/www/
    localbin     /usr/local/bin/
$ g web&amp;lt;tab&amp;gt;
$ g web          # cd to /var/www/
$ o web     	 # Open in Finder if on a mac
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&#34;extra-features&#34;&gt;Extra Features&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;if no bookmark name is specified the default directory is used instead  ($HOME unless changed)&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;cd ~/projects
s
g              # g now defaults to ~/projects
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Commands can be placed after the bookmark&lt;br /&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;$ g web ls     # cd to ~/home/projects/www/ then executes ls
~/var/www/
index.html
site.css
$
&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;cd like features&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;g -   # does cd -
g ..  # does cd ..
g /   # does cd /
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;mac-specific-features&#34;&gt;Mac Specific Features&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;o&lt;/code&gt; command which opens the specified bookmark in Finder&lt;/li&gt;
&lt;li&gt;&lt;code&gt;t&lt;/code&gt; command which opens the specified bookmark in a new Terminal tab.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;y web          # opens ~/home/projects/www/  in a new tab
cd javascript
y              # opens ~/home/projects/www/javascript in a new tab

o              # opens ~/home/projects/www/javascript in Finder
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=&#34;install&#34;&gt;Install&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;git clone git://github.com/Bilalh/shellmarks.git&lt;/li&gt;
&lt;li&gt;make install&lt;/li&gt;
&lt;li&gt;&lt;code&gt;source ~/.local/bin/shellmarks.sh&lt;/code&gt; from within your &lt;code&gt;~.bash_profile&lt;/code&gt; or &lt;code&gt;~/.bashrc&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;OR&lt;/p&gt;

&lt;p&gt;download &lt;a href=&#34;https://raw.githubusercontent.com/Bilalh/shellmarks/master/shellmarks.sh&#34;&gt;https://raw.githubusercontent.com/Bilalh/shellmarks/master/shellmarks.sh&lt;/a&gt; and source it from within your &lt;code&gt;~.bash_profile&lt;/code&gt; or &lt;code&gt;~/.bashrc&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&#34;more-information&#34;&gt;More Information&lt;/h2&gt;

&lt;p&gt;See the &lt;a href=&#34;https://bilalh.github.io/shellmarks
&#34; title=&#34;shellmarks project page&#34;&gt;project page&lt;/a&gt;  for information.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>fixing corrupt mp3s</title>
      <link>https://bilalh.github.io/2011/12/24/fixing-corrupt-mp3s/</link>
      <pubDate>Sat, 24 Dec 2011 16:33:17 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2011/12/24/fixing-corrupt-mp3s/</guid>
      <description>

&lt;p&gt;To fix a corrupt mp3 &lt;a href=&#34;http://mp3val.sourceforge.net/&#34;&gt;mp3val&lt;/a&gt; can be used.  The website provides binaries for Windows, and sources for other platforms including Linux and Mac OS X.&lt;/p&gt;

&lt;h2 id=&#34;installation&#34;&gt;Installation&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Update&lt;/strong&gt;: binaries for Mac OS X (tested on 10.6) &lt;a href=&#34;https://bilalh.github.io/files/mp3val
&#34;&gt;here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To install on a Mac either install it the easy way:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;brew install mp3val
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;or download the sources and then &lt;code&gt;cd&lt;/code&gt; to the directory of sources and then do&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;make -f Makefile.gcc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and then place the binaries in you &lt;code&gt;$PATH&lt;/code&gt; e.g. &lt;code&gt;/usr/local/bin&lt;/code&gt;&lt;/p&gt;

&lt;h2 id=&#34;usage&#34;&gt;Usage&lt;/h2&gt;

&lt;p&gt;To fix the corrupt mp3s use the following&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mp3val -f
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which tells &lt;code&gt;mp3val&lt;/code&gt; to fix the errors in the mp3s.  Shell wildcards can be used e.g.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;mp3val -f *.mp3
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;which will fix all mp3 in the current directory.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;mp3val&lt;/code&gt; also keeps all the old tags as well, which is useful.&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>MPlayer OSX Extended Release 1</title>
      <link>https://bilalh.github.io/2011/12/20/mplayer-osx-extended-release-1/</link>
      <pubDate>Tue, 20 Dec 2011 17:37:31 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2011/12/20/mplayer-osx-extended-release-1/</guid>
      <description>

&lt;p&gt;A new binary of &lt;a href=&#34;https://bilalh.github.io/mplayer-osx-extended/
&#34; title=&#34;MPlayer OSX Extended&#34;&gt;MPlayer OSX Extended&lt;/a&gt; has been released&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/downloads/Bilalh/MPlayer-OSX-Extended/MPlayer%20OSX%20Extended.zip&#34; title=&#34;MPlayer OSX Extended Binary&#34;&gt;Download Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/Bilalh/MPlayer-OSX-Extended&#34; title=&#34;MPlayer OSX Extended GitHub Repository&#34;&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;

&lt;h2 id=&#34;new-features&#34;&gt;New Features&lt;/h2&gt;

&lt;h3 id=&#34;file-types-information&#34;&gt;File Types Information&lt;/h3&gt;

&lt;p&gt;I added type information about movies as shown below. This gives the user more info when looking at video/audio  files in Finder.
&lt;img src=&#34;https://bilalh.github.io/media/code/MPlayer-OSX-Extended/Filetypes.png
&#34; alt=&#34;Filetypes&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;media-keys&#34;&gt;Media Keys&lt;/h3&gt;

&lt;p&gt;Support for media keys (F7, F8, F9) on Apple keyboards has been added.&lt;/p&gt;

&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th align=&#34;left&#34;&gt;Key&lt;/th&gt;
&lt;th align=&#34;left&#34;&gt;Function&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;

&lt;tbody&gt;
&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;PlayPause (F8)&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;Plays/Pauses&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;Rewind(F7)&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;Skip to Previous&lt;/td&gt;
&lt;/tr&gt;

&lt;tr&gt;
&lt;td align=&#34;left&#34;&gt;Fast forward(F9)&lt;/td&gt;
&lt;td align=&#34;left&#34;&gt;Skip to Next&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;

&lt;h3 id=&#34;keyboard&#34;&gt;Keyboard&lt;/h3&gt;

&lt;p&gt;All of MPlayer keyboard shortcuts have been added, a list of keyboard shortcuts is in the help and can be viewed &lt;a href=&#34;https://bilalh.github.io/2011/12/09/mplayer-keybindings/&#34; title=&#34;Complete List of keyboard shortcuts&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&#34;help&#34;&gt;Help&lt;/h3&gt;

&lt;p&gt;I am (re)wrote most of the help&lt;/p&gt;

&lt;h3 id=&#34;next-episode&#34;&gt;Next Episode&lt;/h3&gt;

&lt;p&gt;A menu item (Play Next Episode) that plays the next episode based on the currently playing file has been added and is bound to  ⌘E. This works for most formats of naming including&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;File Name 01&lt;/li&gt;
&lt;li&gt;File_Name_1&lt;/li&gt;
&lt;li&gt;File Name Episode 1&lt;/li&gt;
&lt;/ul&gt;

&lt;h3 id=&#34;icons&#34;&gt;Icons&lt;/h3&gt;

&lt;p&gt;Icons for all the file types have been added, below are a sample the rest can seen &lt;a href=&#34;https://github.com/Bilalh/MPlayer-OSX-Extended/tree/build/extras/File%20Type%20Icons&#34; title=&#34;Complete set of icons&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id=&#34;video-icons&#34;&gt;Video Icons&lt;/h3&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/code/MPlayer-OSX-Extended/Video.png
&#34; alt=&#34;Video Icons&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;audio-icons&#34;&gt;Audio Icons&lt;/h3&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/code/MPlayer-OSX-Extended/Audio.png
&#34; alt=&#34;Audio Icons&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;subtitles-icons&#34;&gt;Subtitles Icons&lt;/h3&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/code/MPlayer-OSX-Extended/Subtitles.png
&#34; alt=&#34;Subtitles Icons&#34; /&gt;&lt;/p&gt;

&lt;h3 id=&#34;binary-icon&#34;&gt;Binary Icon&lt;/h3&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/code/MPlayer-OSX-Extended/Binary.png
&#34; alt=&#34;Binary Icon&#34; /&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>MPlayer keybindings</title>
      <link>https://bilalh.github.io/2011/12/09/mplayer-keybindings/</link>
      <pubDate>Fri, 09 Dec 2011 06:25:32 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2011/12/09/mplayer-keybindings/</guid>
      <description>&lt;p&gt;A list of MPlayer&amp;rsquo;s keybindings since it hard to find a complete list online.
If using a Mac consider using &lt;a href=&#34;https://bilalh.github.io/mplayer-osx-extended/
&#34; title=&#34;MPlayer OSX Extended&#34;&gt;MPlayer OSX Extended&lt;/a&gt; which is the best GUI for MPlayer on the mac.&lt;/p&gt;

&lt;table  &gt;
    &lt;tbody&gt;&lt;tr&gt; &lt;td colspan=&#34;2&#34; class=&#39;row-sub-heading&#39;&gt; Common  &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  p / SPACE  &lt;/td&gt;  &lt;td&gt; Pause (pressing again unpauses). &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  q / ESC  &lt;/td&gt;  &lt;td&gt; Stop playing. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  f  &lt;/td&gt;  &lt;td&gt; Toggle fullscreen &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  #  &lt;/td&gt;  &lt;td&gt; Cycle through the available audio tracks. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  T  &lt;/td&gt;  &lt;td&gt; Toggle stay-on-top &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt; &lt;td colspan=&#34;2&#34; class=&#39;row-sub-heading&#39;&gt; Navigation &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  ← and →  &lt;/td&gt;  &lt;td&gt; Seek backward/forward 10 seconds. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  ↓ and ↑   &lt;/td&gt;  &lt;td&gt; Seek backward/forward 1 minute. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  Pagedown and Pageup  &lt;/td&gt;  &lt;td&gt; Seek backward/forward 10 minutes. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  ! and @  &lt;/td&gt;  &lt;td&gt; Seek to the beginning of the previous/next chapter. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt; &lt;td  colspan=&#34;2&#34;&gt; &lt;b&gt;Volume&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  / and *  &lt;/td&gt;  &lt;td&gt; Decrease/increase volume. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  9 and 0  &lt;/td&gt;  &lt;td&gt; Decrease/increase volume. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  m  &lt;/td&gt;  &lt;td&gt; Mute sound. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt; &lt;td  colspan=&#34;2&#34;&gt; &lt;b&gt;Subtitles&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  j  &lt;/td&gt;  &lt;td&gt; Cycle through the available subtitles. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  J  &lt;/td&gt;  &lt;td&gt; Cycle through the available subtitles backwards. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  y and g  &lt;/td&gt;  &lt;td&gt; Step forward/backward in the subtitle list.  &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  x and z  &lt;/td&gt;  &lt;td&gt; Adjust subtitle delay by +/- 0.1 seconds. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  &lt;/td&gt;&lt;/tr&gt;&lt;tr&gt; &lt;td  colspan=&#34;2&#34;&gt; &lt;b&gt;Playlists&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt;    &lt;tr&gt;&lt;td&gt;  &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  &amp;lt; and &amp;gt;  &lt;/td&gt;  &lt;td&gt; Go backward/forward in the playlist. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  ENTER  &lt;/td&gt;  &lt;td&gt; Go forward in the playlist. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  HOME and END  &lt;/td&gt;  &lt;td&gt; next/previous playtree entry in the parent list. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt; &lt;td colspan=&#34;2&#34; class=&#39;row-sub-heading&#39;&gt; Information &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  I  &lt;/td&gt;  &lt;td&gt; Show filename on the OSD. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  P  &lt;/td&gt;  &lt;td&gt; Show current time/total time &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  o  &lt;/td&gt;  &lt;td&gt; Toggle OSD states: none / seek / seek + timer / seek + timer + total time. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  ⇥ (Tab)  &lt;/td&gt;  &lt;td&gt; Cycle timestamp display modes &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt; &lt;td colspan=&#34;2&#34;&gt; \1 &lt;/td&gt; &lt;/tr&gt;  
    &lt;tr&gt;  &lt;td&gt;  + and -  &lt;/td&gt;  &lt;td&gt; Adjust audio delay by +/- 0.1 seconds.  &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  d  &lt;/td&gt;  &lt;td&gt; Toggle frame dropping states: none / skip display / skip decoding. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt; &lt;td  colspan=&#34;2&#34;&gt; &lt;b&gt;Playback Speed&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  [ and ]  &lt;/td&gt;  &lt;td&gt; Decrease/increase current playback speed by 10%. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  { and }  &lt;/td&gt;  &lt;td&gt; Halve/double current playback speed. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  backspace  &lt;/td&gt;  &lt;td&gt; Reset playback speed to normal &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt; &lt;td  colspan=&#34;2&#34;&gt; &lt;b&gt;Video Equaliser&lt;/b&gt; &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  1 and 2  &lt;/td&gt;  &lt;td&gt; Adjust contrast. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  3 and 4  &lt;/td&gt;  &lt;td&gt; Adjust brightness. &lt;/td&gt; &lt;/tr&gt;

    &lt;tr&gt;  &lt;td&gt;  5 and 6  &lt;/td&gt;  &lt;td&gt; Adjust hue. &lt;/td&gt; &lt;/tr&gt;
    &lt;tr&gt;  &lt;td&gt;  7 and 8  &lt;/td&gt;  &lt;td&gt; Adjust saturation. &lt;/td&gt; &lt;/tr&gt;


&lt;/tbody&gt;&lt;/table&gt;
</description>
    </item>
    
    <item>
      <title>Blueboard TextMate Theme</title>
      <link>https://bilalh.github.io/2011/10/22/blueboard-textmate-theme/</link>
      <pubDate>Sat, 22 Oct 2011 23:20:14 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2011/10/22/blueboard-textmate-theme/</guid>
      <description>

&lt;p&gt;My theme for TextMate, works well for Ruby, CSS, Markdown, C, Bash and TeX:&lt;/p&gt;

&lt;h2 id=&#34;ruby&#34;&gt;Ruby&lt;/h2&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/posts/textmate/ruby.png
&#34; alt=&#34;Ruby&#34; /&gt;&lt;/p&gt;

&lt;h2 id=&#34;tex&#34;&gt;TeX&lt;/h2&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/posts/textmate/tex.png
&#34; alt=&#34;Tex&#34; /&gt;&lt;/p&gt;

&lt;h2 id=&#34;markdown&#34;&gt;Markdown&lt;/h2&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/posts/textmate/markdown.png
&#34; alt=&#34;Markdown&#34; /&gt;&lt;/p&gt;

&lt;h2 id=&#34;css&#34;&gt;CSS&lt;/h2&gt;

&lt;p&gt;&lt;img src=&#34;https://bilalh.github.io/media/posts/textmate/css.png
&#34; alt=&#34;css&#34; /&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://raw.github.com/Bilalh/TextMateThemes/master/Blueboard.tmTheme&#34; download=&#34;Blueboard.tmTheme&#34;&gt;Download Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&#34;https://github.com/Bilalh/TextMateThemes&#34; title=&#34;Blueboard TextMate theme Repository&#34;&gt;GitHub Repository&lt;/a&gt;&lt;/p&gt;
</description>
    </item>
    
    <item>
      <title>Useful sed commands</title>
      <link>https://bilalh.github.io/2011/10/09/useful-sed-commands/</link>
      <pubDate>Sun, 09 Oct 2011 17:20:59 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2011/10/09/useful-sed-commands/</guid>
      <description>

&lt;h3 id=&#34;delete-nth-line-inplace&#34;&gt;Delete nth line inplace&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;sed -i .tmp &#39;&amp;lt;n&amp;gt;d&#39; &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;get-the-nth-line&#34;&gt;Get the nth line&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;sed &#39;&amp;lt;n&amp;gt;q;d&#39; &amp;lt;filename&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;delete-the-first-10-lines-of-a-file&#34;&gt;Delete the first 10 lines of a file&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;sed &#39;1,10d&#39;
&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id=&#34;delete-lines-matching-pattern&#34;&gt;Delete lines matching pattern&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt; sed &#39;/pattern/d&#39;
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
    <item>
      <title>ls colours</title>
      <link>https://bilalh.github.io/2011/09/10/ls-colours/</link>
      <pubDate>Sat, 10 Sep 2011 00:12:45 +0000</pubDate>
      <author>bilalshussain@gmail.com (Bilal Syed Hussain)</author>
      <guid>https://bilalh.github.io/2011/09/10/ls-colours/</guid>
      <description>&lt;p&gt;To get &lt;code&gt;ls&lt;/code&gt; colours  on a mac add the follow to your &lt;code&gt;.bash_profile&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code class=&#34;language-bash&#34;&gt;#light colours
export LSCOLORS=ExFxCxDxbxegedabagacad

# dark colours
export LSCOLORS=gxBxhxDxfxhxhxhxhxcxcx
&lt;/code&gt;&lt;/pre&gt;
</description>
    </item>
    
  </channel>
</rss>