<?xml version="1.0"?>
<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/"
	>
   <channel>
      <pubDate>Sat, 11 Oct 2008 07:05:00 GMT</pubDate>
      <lastBuildDate>Sat, 11 Oct 2008 07:05:00 GMT</lastBuildDate>
      <language>en</language>
      <docs>http://www.rssboard.org/rss-specification</docs>
      <title>CrunchBang ~ hack</title>
      <link>http://crunchbang.org/tags/hack/</link>
      <description>Code, Design &amp; GNU/Linux</description>

<item>
    <title>Firefox Bookmarklet for Flickr CC Search</title>
    <link>http://crunchbang.org/archives/2007/11/27/firefox-bookmarklet-for-flickr-cc-search/</link>
    <pubDate>Tue, 27 Nov 2007 02:58:27 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/11/27/firefox-bookmarklet-for-flickr-cc-search/</guid>
    <description><![CDATA[
    <p>Searching <a href="http://www.flickr.com/ " title="Flickr LOVES YOU">Flickr</a> for images licensed under <a href="http://www.flickr.com/creativecommons/ " title="Creative Commons page at Flickr.">Creative Commons</a> is painfully slow and frustrating. For every new query you have to visit the <a href="http://www.flickr.com/search/advanced/ " title="Flickr Advanced Search">advanced search page</a> and select the appropriate check boxes before hitting the search button. I&#39;ve been using Flickr in this way quite a bit lately and so I wanted to find an easier way to achieve this task.</p>

<p>I turned to Google and found this <a href="http://internetducttape.com/tools/flickr-always-search-for-creative-commons/ " title="Flickr always search for Creative Commons licensed photos.">Greasemonkey hack</a>. It looks good and does what I want, however I don&#39;t use <a href="https://addons.mozilla.org/en-US/firefox/addon/748 " title="Firefox Add-ons - Greasemonkey">Greasemonkey</a> and I&#39;m not about to start using it anytime soon. So I ended up creating a quick bookmarklet to do the job instead &#8212; I don&#39;t know why I didn&#39;t do this in the first place, it only took seconds?!</p>

<p><strong><a href="javascript:(function(){ q=document.getSelection(); if(!q) q=prompt('Flickr%20Creative%20Commons%20Search:'); if(q) location.href='http://www.flickr.com/search/?ct=0&amp;ss=0&amp;l=commderiv&amp;q='+escape(q); })()" title="Flickr CC Search">Flickr CC Search</a></strong></p>

<p>You can install the bookmarklet by dragging it your Firefox &#34;Bookmarks&#34; toolbar.</p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/bookmarklets/" title="Browse all posts tagged with &#8220;bookmarklets&#8221;">bookmarklets</a>, <a href="http://crunchbang.org/tags/hacks/" title="Browse all posts tagged with &#8220;hacks&#8221;">hacks</a>, <a href="http://crunchbang.org/tags/javascript/" title="Browse all posts tagged with &#8220;javascript&#8221;">javascript</a>, <a href="http://crunchbang.org/tags/tools/" title="Browse all posts tagged with &#8220;tools&#8221;">tools</a></p>
    ]]></description>
</item>

<item>
    <title>dict.org Bookmarklets for Firefox</title>
    <link>http://crunchbang.org/archives/2007/10/27/dict-dot-org-bookmarklets-for-firefox/</link>
    <pubDate>Sat, 27 Oct 2007 15:07:28 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/10/27/dict-dot-org-bookmarklets-for-firefox/</guid>
    <description><![CDATA[
    <p>As well as <a href="http://crunchbang.org/archives/2007/10/27/i-like-monkeys/ " title="I Like Monkeys">liking monkeys</a> I also like <a href="http://dict.org/ " title="dict.org - free dictionary and thesaurus lookup.">dict.org</a>. I&#39;ve been using it more-and-more since my rant last month about <a href="http://crunchbang.org/archives/2007/09/30/popup-dictionary-dot-com/ " title="A rant about Dictionary.com and pop-up advertising">pop-up advertising and Dictionary.com</a>.</p>

<p>For anyone unfamiliar with dict.org, it&#39;s basically a free service <em>without any adverts</em> that provides a fast dictionary and thesaurus lookup [<em>it does more too!</em>]</p>

<h3>The bookmarklets</h3>

<p>This morning I decided to play about with creating a <a href="http://en.wikipedia.org/wiki/Bookmarklet " title="Wikipedia - Bookmarklet">Bookmarklet</a> to help perform dict.org queries. I ended up creating three. One to perform a standard query, another to perform dictionary only queries, and the final one to perform thesaurus only queries. The bookmarklets are below:</p>

<p><strong><a href="javascript:(function(){ q=document.getSelection(); if(!q) q=prompt('dict.org%20Search:'); if(q) location.href='http://www.dict.org/bin/Dict?Form=Dict1&amp;Strategy=*&amp;Database=*&amp;Query='+escape(q); })()" title="dict.org lookup">dict.org lookup</a></strong> &#8212; for performing default queries [<em>dictionary + thesaurus + more</em>]<br />
<strong><a href="javascript:(function(){ q=document.getSelection(); if(!q) q=prompt('Dictionary%20Search:'); if(q) location.href='http://www.dict.org/bin/Dict?Form=Dict1&amp;Strategy=*&amp;Database=gcide&amp;Query='+escape(q); })()" title="dictionary lookup">dictionary lookup</a></strong> &#8212; for erm&#8230; &#8230;dictionary only queries<br />
<strong><a href="javascript:(function(){ q=document.getSelection(); if(!q) q=prompt('Thesaurus%20Search:'); if(q) location.href='http://www.dict.org/bin/Dict?Form=Dict1&amp;Strategy=*&amp;Database=moby-thes&amp;Query='+escape(q); })()" title="thesaurus lookup">thesaurus lookup</a></strong> &#8212; for&#8230; &#8230;work it out :)</p>

<p>All three bookmarklets work the same way. You can either highlight a word on the web page you are viewing before clicking the bookmarklet to perform the query; or click the bookmarklet and type a word at the prompt.</p>

<h3>Howto install the bookmarkets</h3>

<p>Simply left-click and drag any of the bookmarklets to your Bookmarks Toolbar within Firefox.</p>

<p>Before installing the bookmarklets it should be noted that I&#39;ve only tested them with Firefox &#8212; as an <a href="http://ubuntu.com/ " title="Ubuntu Linux">Ubuntu</a> user it&#39;s pretty much the only browser I use. Please let me know [<em>post a comment or something</em>] if you test them with any other browsers.</p>

<h3>Credits</h3>

<p>These bookmarklets are a direct hack of the <a href="http://dictionary.reference.com/tools/bookmarklets.html " title="Bookmarklets for Dictionary.com">free browser buttons available for Dictionary.com</a>. These were inspired by the work of Steve Kangas at <a href="http://www.bookmarklets.com/ " title="Bookmarklets.com">Bookmarklets.com</a>.</p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/bookmarklets/" title="Browse all posts tagged with &#8220;bookmarklets&#8221;">bookmarklets</a>, <a href="http://crunchbang.org/tags/hacks/" title="Browse all posts tagged with &#8220;hacks&#8221;">hacks</a>, <a href="http://crunchbang.org/tags/javascript/" title="Browse all posts tagged with &#8220;javascript&#8221;">javascript</a>, <a href="http://crunchbang.org/tags/tools/" title="Browse all posts tagged with &#8220;tools&#8221;">tools</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

<item>
    <title>Greasemonkey Hack for Google Reader</title>
    <link>http://crunchbang.org/archives/2007/10/06/greasemonkey-hack-for-google-reader/</link>
    <pubDate>Sat, 06 Oct 2007 19:05:35 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/10/06/greasemonkey-hack-for-google-reader/</guid>
    <description><![CDATA[
    <p>Some hacks are <a href="http://crunchbang.org/archives/2007/10/05/a-virtual-richard-stallman-for-cowsay-hack/ " title="A Virtual Richard Stallman for Cowsay Hack.">are pointless</a>, others are not. This <a href="http://automorphic.blogspot.com/2007/10/burned-again-by-google-reader.html " title="Greasemonkey hack for Google Reader.">Greasemonkey hack</a> will remove the dreaded &#34;Mark all as read&#34; button from the Google Reader UI. Sweet.</p>

<p>For more info about Greasemonkey see: <a href="http://www.greasespot.net/ " title="The Greasepot.">http://www.greasespot.net/</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/hacks/" title="Browse all posts tagged with &#8220;hacks&#8221;">hacks</a>, <a href="http://crunchbang.org/tags/tools/" title="Browse all posts tagged with &#8220;tools&#8221;">tools</a></p>
    ]]></description>
</item>

<item>
    <title>A Virtual Richard Stallman for Cowsay Hack</title>
    <link>http://crunchbang.org/archives/2007/10/05/a-virtual-richard-stallman-for-cowsay-hack/</link>
    <pubDate>Fri, 05 Oct 2007 23:46:20 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/10/05/a-virtual-richard-stallman-for-cowsay-hack/</guid>
    <description><![CDATA[
    <p>I&#39;m not sure how this came about as unfortunately I wasn&#39;t there, but apparently the other night, users in the <a href="irc://irc.freenode.org/ubuntu-uk " title="#ubuntu-uk IRC channel">#ubuntu-uk</a> channel had some fun with <code>vrms</code>. And then today it spread from the IRC channel to the <a href="http://lists.ubuntu.com/mailman/listinfo/ubuntu-uk " title="Ubuntu-uk mailing list">mailing list</a>.</p>

<p>I submitted my system output as requested [<em>well it is Friday!</em>] However, I did feel a little disappointed by the <code>vrms</code> program. Sure, it&#39;s good at what it does [<em>actually this is debatable as it only counts packages installed with apt!?</em>] but the output was a little boring.</p>

<p>Surely it would be better if RMS were to present the results himself? Enter my little hack.</p>

<h3>Instructions for Ubuntu</h3>

<p><strong>1.</strong> Make sure you have both <code>vrms</code> and <code>cowsay</code> installed. You can install them using apt with the following terminal command:</p>

<pre><code>sudo apt-get install vrms cowsay
</code></pre>

<p><strong>2.</strong> Download my rms.cow file with the command:</p>

<pre><code>wget http://crunchbang.org/misc/rms.cow
</code></pre>

<p><strong>3.</strong> Move the cow file to Cowsay&#39;s cows directory with the command:</p>

<pre><code>sudo mv rms.cow /usr/share/cowsay/cows/rms.cow
</code></pre>

<p><strong>4.</strong> Now run the following command to have <code>cowsay</code> output your <code>vrms</code> results:</p>

<pre><code>cowsay -f rms -W 60 `vrms`
</code></pre>

<p><strong>5.</strong> Now marvel at the screen! It should look something like my example below:</p>

<p><span style="outline:4px solid #babdb6;"><img src="http://crunchbang.org/uploads/100507173725-cowsay-vrms.gif" alt="Screen grab of Richard Stallman Cowsay Hack" /></span></p>

<p><strong>Note:</strong> Obviously this is hours of fun, but if you get bored [<em>surely not</em>] you can always have RMS say something else, try the following for example:</p>

<pre><code>cowsay -f rms LugRadio, bunch of freedom haters!
</code></pre>

<p>You <a href="http://digg.com/submit?phase=2&amp;url=http://crunchbang.org/archives/2007/10/05/a-virtual-richard-stallman-for-cowsay-hack/&amp;title=A Virtual Richard Stallman for Cowsay Hack " title="Digg this!">digg?</a></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/fun/" title="Browse all posts tagged with &#8220;fun&#8221;">fun</a>, <a href="http://crunchbang.org/tags/hack/" title="Browse all posts tagged with &#8220;hack&#8221;">hack</a>, <a href="http://crunchbang.org/tags/lugradio/" title="Browse all posts tagged with &#8220;lugradio&#8221;">lugradio</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

<item>
    <title>gedit todo Hack</title>
    <link>http://crunchbang.org/archives/2007/09/25/gedit-todo-hack/</link>
    <pubDate>Tue, 25 Sep 2007 07:28:55 GMT</pubDate>
    <dc:creator>Philip Newborough</dc:creator>
    <guid>http://crunchbang.org/archives/2007/09/25/gedit-todo-hack/</guid>
    <description><![CDATA[
    <p><strong>UPDATE &#8212; Sun 21 Oct 2007</strong><br />
<em>This works for Feisty but not Gutsy. I&#39;ll update this hack for Gutsy when I get time.</em></p>

<p>I&#39;m not sure if anyone will find this little hack useful but I thought I&#39;d post about it anyhow. Basically, I have always kept my to-do list in a simple text file on my desktop. Each new to-do item gets put on its own line in the file and I mark the beginning of each line with an indicator to show whether the item is waiting to be done [-], been done [#]or been canceled [;].</p>

<p>An example of this might look like:</p>

<pre><code>/*
 * stuff to do and stuff that's already been done
 */
- complete report for Mr Smith
- take dog for walk
# blog about todo hack
; fly to the moon
# buy milk
# etc etc
</code></pre>

<p>Keeping my to-do list in this fashion has worked great for years and my current to-do list is a couple of thousand lines long. The only problem with my to-do list is it can be hard to read and scan. Enter my <a href="http://www.gnome.org/projects/gedit/ " title="Find out more about gedit.">gedit</a> hack.</p>

<p>gedit is GNOME&#39;s default text editor and I use it to edit my to-do list. One of gedit&#39;s great features [<em>it has many more</em>] is its ability to do syntax highlighting. My hack basically involves creating a new language file so that gedit will be able to highlight my to-do items differently depending on their status. Simply follow the instructions below to recreate the hack:</p>

<p>Enter the following command in your terminal:</p>

<pre><code>sudo gedit /usr/share/gtksourceview-1.0/language-specs/todo.lang
</code></pre>

<p>Now copy &amp; paste the following lines into the file before saving and closing gedit:</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE language SYSTEM "language.dtd"&gt;
&lt;language _name="TODO" version="1.0" _section="Others" mimetypes="text/plain"&gt;

    &lt;block-comment _name = "Header" style = "Header"&gt;
        &lt;start-regex&gt;/*&lt;/start-regex&gt;
            &lt;end-regex&gt;*/&lt;/end-regex&gt;
    &lt;/block-comment&gt;

    &lt;line-comment _name = "Uncomplete" style= "To do"&gt;
        &lt;start-regex&gt;-&lt;/start-regex&gt;
    &lt;/line-comment&gt;

    &lt;line-comment _name = "Complete" style= "Complete"&gt;
        &lt;start-regex&gt;#&lt;/start-regex&gt;
    &lt;/line-comment&gt;

    &lt;line-comment _name = "Cancelled" style= "Cancelled"&gt;
        &lt;start-regex&gt;;&lt;/start-regex&gt;
    &lt;/line-comment&gt;

&lt;/language&gt;
</code></pre>

<p>Now restart gedit and create a new to-do list file using the syntax shown in my example above. Then from gedit&#39;s menu go:</p>

<pre><code>View -&gt; Highlight Mode -&gt; Others -&gt; TODO
</code></pre>

<p>And finally, edit how you would like the highlighting to look. Again, from gedit&#39;s menu go:</p>

<pre><code>Edit -&gt; Preferences -&gt; Syntax Highlighting
</code></pre>

<p>Once you have completed these steps you should have a nice syntax highlighted to-do file. See my example below:</p>

<p><span style="outline:4px solid #babdb6;"><img src="http://crunchbang.org/uploads/093007064832-todo-list.png" alt="Screen grab of sample to-do list." /></span></p>

    <p style="font-size:smaller;">Tags: <a href="http://crunchbang.org/tags/gedit/" title="Browse all posts tagged with &#8220;gedit&#8221;">gedit</a>, <a href="http://crunchbang.org/tags/hacks/" title="Browse all posts tagged with &#8220;hacks&#8221;">hacks</a>, <a href="http://crunchbang.org/tags/linux/" title="Browse all posts tagged with &#8220;linux&#8221;">linux</a>, <a href="http://crunchbang.org/tags/ubuntu/" title="Browse all posts tagged with &#8220;ubuntu&#8221;">ubuntu</a></p>
    ]]></description>
</item>

 </channel>
</rss>