<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description></description><title>Stan Angeloff’s blog</title><generator>Tumblr (3.0; @stanangeloff)</generator><link>http://blog.angeloff.name/</link><item><title>Ubuntu 12.04 (Precise) light menus</title><description>&lt;p&gt;The design team at Canonical has decided to refresh the default theme in Ubuntu for its LTS release to feature light menus from light sources and dark menus from dark sources.&lt;/p&gt;

&lt;p&gt;If you are anything like me, the decision didn&amp;#8217;t probably go well with you either. I&amp;#8217;ve been hacking on a &amp;#8216;proper&amp;#8217; port back to dark menus, those interested can find the &lt;a href="https://github.com/StanAngeloff/AmbianceOneiric"&gt;source and instructions&lt;/a&gt; available on GitHub.&lt;/p&gt;

&lt;p&gt;I&amp;#8217;ve &lt;a href="https://github.com/StanAngeloff/AmbianceOneiric/commit/99835042fcf1dc037134b9c7330f905451eccc9d"&gt;kept the changes&lt;/a&gt; to a minimum so you&amp;#8217;d still get all other improvements, such as less prominent controls for windows out of focus.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/21975837465</link><guid>http://blog.angeloff.name/post/21975837465</guid><pubDate>Sat, 28 Apr 2012 16:55:26 +0300</pubDate></item><item><title>Failed to load module "globalmenu-gtk" after uninstalling gnome-shell</title><description>&lt;p&gt;If you get:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;Gtk-Message: Failed to load module "globalmenu-gtk"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;every time you launch an app, you have left a Gnome Shell module, which is no longer present on your system, in your &lt;code&gt;GTK_MODULES&lt;/code&gt; environment variable. In my case, I enabled the Global Menu extension in Gnome Tweak Tool and then uninstalled Gnome Shell. To fix, I &lt;code&gt;rm&lt;/code&gt;ed the &lt;code&gt;/etc/profile.d/globalmenu.sh&lt;/code&gt; file and rebooted.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/17155714352</link><guid>http://blog.angeloff.name/post/17155714352</guid><pubDate>Mon, 06 Feb 2012 17:53:09 +0200</pubDate></item><item><title>Diff'ing images in Git</title><description>&lt;p&gt;I use Git on the command-line usually, but lately I&amp;#8217;m using more and more of &lt;a href="http://cola.tuxfamily.org/"&gt;git-cola&lt;/a&gt;. It&amp;#8217;s compact, keyboard-friendly, regularly updated, features a clean UI with main focus on staging and diffs. It was while working in git-cola merging over 100+ files from two different branches that I discovered quite a few overlapping image files. The diff panel was useless and it&amp;#8217;s not like I can rely on the command-line for non-textual diffs. Did what every developer does nowadays when faced with an issue, I googled &lt;em&gt;side-by-side diffs&lt;/em&gt;, &lt;em&gt;git diff images&lt;/em&gt; and any other combination of words and phrases I could come up. There wasn&amp;#8217;t much, if anything, useful that came up in the results so I got to work.&lt;/p&gt;

&lt;p&gt;I run Ubuntu and Gtk immediately came to mind. It shouldn&amp;#8217;t be too difficult to display the two images with their dimensions side-by-side in a window. I don&amp;#8217;t need fancy &lt;a href="https://github.com/blog/817-behold-image-view-modes"&gt;image view modes&lt;/a&gt;, just having the two images next to each other would give me enough information to decide which one to accept. At the end, having never done any PyGtk programming before, I came up with a 50-line script that does just what I need:&lt;/p&gt;

&lt;script src="https://gist.github.com/1716699.js"&gt;&lt;/script&gt;&lt;p&gt;&lt;img src="https://p.twimg.com/AkkMTtpCMAAtKL8.png"/&gt;&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s not an ultimate solution. It will choke up on large images, it doesn&amp;#8217;t handle transparency well and there are no controls like zooming in/out, but it is better than nothing.&lt;/p&gt;

&lt;p&gt;Overall, I found the PyGtk documentation very easy to read, there are plenty of tutorials around and the &lt;a href="http://developer.gnome.org/gtk3/3.0/"&gt;API reference&lt;/a&gt; has all the information one needs.&lt;/p&gt;

&lt;p&gt;Tip: in git-cola, &lt;c-d&gt; will open up the configured diff tool for the highlighted file.&lt;/c-d&gt;&lt;/p&gt;</description><link>http://blog.angeloff.name/post/16880373225</link><guid>http://blog.angeloff.name/post/16880373225</guid><pubDate>Wed, 01 Feb 2012 23:32:00 +0200</pubDate></item><item><title>Not enough random bytes available.</title><description>&lt;h3&gt;Please do some other work to give the OS a chance to collect more entropy! (Need more bytes)&lt;/h3&gt;

&lt;p&gt;I decided to upgrade &lt;code&gt;pacman&lt;/code&gt; on Arch Linux recently. I was advised to run &lt;code&gt;[sudo] pacman-key --init&lt;/code&gt; after the update had finished. Sounds simple enough, just one extra command I need to copy -&amp;gt; paste to get me going again. Wrong. It turns out &lt;strong&gt;gpg&lt;/strong&gt; will go about generating a very strong key (did not investigate the exact key size). On my not-so-busy machine it would just sit there doing (what would appear as) nothing for hours. To generate entropy, &lt;code&gt;/dev/random&lt;/code&gt; &lt;a href="http://sublimated.wordpress.com/2007/08/28/not-enough-random-bytes-available/"&gt;is used&lt;/a&gt;. I started:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cat /dev/random
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;in a remote session and there was nothing printed on-screen, e.g., nothing was being generated, e.g., no entropy, e.g., no &lt;strong&gt;gpg&lt;/strong&gt; joy. What follows is a very ugly hack to speed things up. Keep the above remote connection open and connect to the machine in a separate tab/window. Start &lt;code&gt;pacman-key&lt;/code&gt; as instructed earlier. Leave the window/tab open and connect again, in a third, separate window/tab. Repeat (many) times:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ ls -R /
$ [sudo] sync
$ sudo tee /proc/sys/vm/drop_caches &amp;lt;&amp;lt;&amp;lt; 3
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Ugly, I know.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/16404732719</link><guid>http://blog.angeloff.name/post/16404732719</guid><pubDate>Tue, 24 Jan 2012 14:38:45 +0200</pubDate></item><item><title>pacman -Syu barfs error: XYZ: signature is unknown trust</title><description>&lt;p&gt;Things kept getting better and better. Following the recent &lt;a href="http://blog.angeloff.name/post/16404732719/not-enough-random-bytes-available"&gt;pacman upgrade&lt;/a&gt;, I was now facing issues with regards to package signatures. I had already successfully completed the keyring initialisation and I was a bit stumbled as to what exactly I was doing wrong.&lt;/p&gt;

&lt;p&gt;You remember all those &lt;code&gt;/etc/config saved as /etc/config.new&lt;/code&gt; messages. Yes, as it turns out these are important. Given you haven&amp;#8217;t modified your &lt;code&gt;pacman&lt;/code&gt; configuration (perhaps added to the &lt;code&gt;HoldPkg&lt;/code&gt; list recently?), you can safely accept the new values:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ [sudo] mv /etc/pacman.conf /etc/pacman.conf.pacprev
$ [sudo] mv /etc/pacman.conf.pacnew /etc/pacman.conf
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Re-run &lt;code&gt;[sudo] pacman -Syu&lt;/code&gt; and you are on your way.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/16404872580</link><guid>http://blog.angeloff.name/post/16404872580</guid><pubDate>Tue, 24 Jan 2012 12:45:24 +0200</pubDate></item><item><title>Ubuntu 11.10: Replace the Default (and Annoying) Orange Scheme</title><description>&lt;p&gt;Switching to Ubuntu 11.10 is painful, ugly and time consuming&amp;#8230; but more on that some other time.&lt;/p&gt;

&lt;p&gt;I was quite surprised to see most of the theme control options are now gone. The Appearance panel has no colour tweaks and I hate the default orange scheme. Luckily, there is a way to change it in Gtk3:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo apt-get install dconf-tools
$ dconf-editor
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Browse to &lt;code&gt;org.gnome.desktop.interface&lt;/code&gt;. Locate &lt;code&gt;gtk-color-scheme&lt;/code&gt;. Edit the property:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;bg_color:#f0f1f2;selected_bg_color:#4677f0
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Change the colours to your liking. You may need to re-launch some apps for changes to take effect.&lt;/p&gt;

&lt;p&gt;&amp;#8230;now if I could only get those Gnome Terminal tabs to look darker.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/11431459380</link><guid>http://blog.angeloff.name/post/11431459380</guid><pubDate>Fri, 14 Oct 2011 13:02:00 +0300</pubDate></item><item><title>Compass Magick Tutorial - Part 2</title><description>&lt;p&gt;There is more to Compass Magick than gradients and borders. In the second part of the tutorial series, we will go through the steps to create a simple 3-state button with an icon.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;h2&gt;Recap of &lt;a href="http://blog.angeloff.name/post/4659977659/compass-magick-tutorial-part-1"&gt;Part 1&lt;/a&gt;&lt;/h2&gt;

&lt;p&gt;In Part 1 we completed the tutorial with a simple button-like shape:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/hBLg0.png" alt="Example 4"/&gt;&lt;/p&gt;

&lt;p&gt;We generated the shape using linear gradients, corners and borders from Magick:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// intro.scss
$theme1: red;
$theme2: maroon;

$button_width:  320px;
$button_height: 24px;

body {
  background: transparent magick-canvas($button_width, $button_height,
    magick-fill(
      magick-linear-gradient(
        $theme1,
        $theme2
      )
    )
    magick-corners(10px)
    magick-border($theme2, 10px, 1px)
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;To ensure we can easily change the theme colours, we introduced two &lt;code&gt;$theme&lt;/code&gt; variables at the top of the file.&lt;/p&gt;

&lt;h2&gt;Adding an Icon to the Button&lt;/h2&gt;

&lt;p&gt;Pick an &lt;a href="http://www.iconfinder.com/icondetails/27854/24/about_information_icon"&gt;image&lt;/a&gt; and save it in your &lt;code&gt;images_dir&lt;/code&gt; as &lt;code&gt;icon.png&lt;/code&gt;. If you skipped Part 1 of this tutorial, make sure you have a directory named &lt;code&gt;images&lt;/code&gt; in your project&amp;#8217;s root and add the following line to your Compass configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Add to config.rb
images_dir = 'images'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Magick comes with a very handy &lt;code&gt;magick-compose&lt;/code&gt; function which allows us to put one canvas on top of another. We cannot pass the image file directly to &lt;code&gt;magick-compose&lt;/code&gt; as it will refuse anything other than a canvas object:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// This will NOT work
magick-compose('icon.png')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You&amp;#8217;ve seen how to create a blank canvas using the &lt;code&gt;magick-canvas&lt;/code&gt; function. We can also initialise a canvas object in several other ways, one of which includes the option to load a file from disk:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Loads icon.png and returns a Base64 encoded Data URL
magick-canvas('icon.png')
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Let&amp;#8217;s put the two together for a working solution:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// Loads icon.png and uses it as an overlay
magick-compose(magick-canvas('icon.png'))
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Adding the above line to our button code:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// {intro =&amp;gt; button}.scss
/* …snip… */

body {
  background: transparent magick-sprite('button', magick-canvas($button_width, $button_height,
    /* …snip… */
    magick-compose(magick-canvas('icon.png'))
  ));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Yields the following result:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/LxR7H.png" alt="Example 5"/&gt;&lt;/p&gt;

&lt;p&gt;It&amp;#8217;s not exactly what I would call pretty so let&amp;#8217;s make some changes to the dimensions and colours of the button:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// button.scss
$theme1: #3060bf;
$theme2: #5ca1e5;

$button_width:  280px;
$button_height: 32px;

/* …snip… */
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/QrO1E.png" alt="Example 6"/&gt;&lt;/p&gt;

&lt;p&gt;The CSS &lt;code&gt;background-position&lt;/code&gt; property allows control over where a background image appears inside its container. &lt;code&gt;magick-compose&lt;/code&gt; gives us similar control. To offset the icon 5px horizontally and center it vertically, we pass &lt;code&gt;5px, 50%&lt;/code&gt; after the canvas object (note arguments are comma-separated):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// button.scss
/* …snip… */

body {
  background: transparent magick-sprite('button', magick-canvas($button_width, $button_height,
    /* …snip… */
    magick-compose(magick-canvas('icon.png'), 5px, 50%)
  ));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/1dGXv.png" alt="Example 7"/&gt;&lt;/p&gt;

&lt;h2&gt;Applying Effects&lt;/h2&gt;

&lt;p&gt;Magick packs several pixel-based effects - fade, brightness, contrast, saturation, vibrance and greyscale. We apply them to a canvas object just like we would apply borders or corners:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;magick-effect(fade, 50%)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The first argument selects the desired effect and the second one adjusts its strength.&lt;/p&gt;

&lt;p&gt;For this tutorial, let&amp;#8217;s tune down the icon by making it semi-transparent and reducing the colour intensity:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/* …snip… */
magick-compose(
  magick-canvas('icon.png',
    magick-effect(fade,      50%)
    magick-effect(greyscale, 50%)
  ),
  5px, 50%
)
/* …snip… */
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/yvRaX.png" alt="Example 8"/&gt;&lt;/p&gt;

&lt;p&gt;The effects are applied to the canvas we are composing on top of the button shape. If we move &lt;code&gt;magick-effect&lt;/code&gt; to the top-level canvas (where borders and corners are applied) then the entire button will be semi-transparent - not what we are after.&lt;/p&gt;

&lt;h2&gt;Sprites, the Compass Way&lt;/h2&gt;

&lt;p&gt;We are building a 3-state button. So far we have only constructed the code for our normal state. For the hover state, we simply remove the effects applied on the icon earlier. For the active state, we invert the gradient so the button appears pressed.&lt;/p&gt;

&lt;p&gt;We could save the three states as three different images, but this is not good practise and it will result in three requests to the server.&lt;br/&gt;
The latest release of Compass offers an easy-to-use &lt;a href="http://compass-style.org/help/tutorials/spriting/"&gt;spriting support&lt;/a&gt;. You import the different button states and Compass takes care of the rest.&lt;/p&gt;

&lt;p&gt;Let&amp;#8217;s start by moving our button code from the &lt;code&gt;body&lt;/code&gt; CSS selector to a &lt;code&gt;$button_sprites&lt;/code&gt; Sass variable.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// button.scss
$theme1: #5ca1e5;
$theme2: #3060bf;

$button_width:  280px;
$button_height: 32px;

$button_sprites: magick-sprite('button', magick-canvas($button_width, $button_height,
  magick-fill(
    magick-linear-gradient(
      $theme1,
      $theme2
    )
  )
  magick-corners(10px)
  magick-border($theme2, 10px, 1px)
  magick-compose(
    magick-canvas('icon.png',
      magick-effect(fade,      50%)
      magick-effect(greyscale, 50%)
    ),
    5px, 50%
  )
));

body { }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If we look at the generated CSS, it should be an empty file since there isn&amp;#8217;t any code in the &lt;code&gt;body&lt;/code&gt;. However, &lt;code&gt;button.png&lt;/code&gt; is still generated in &lt;code&gt;images_dir&lt;/code&gt; which is what we are after.&lt;/p&gt;

&lt;p&gt;Before we proceed to out hover state, let&amp;#8217;s rename the generated sprite from &lt;code&gt;'button'&lt;/code&gt; to &lt;code&gt;'button/normal'&lt;/code&gt; which will generate a file &lt;code&gt;button/normal.png&lt;/code&gt;. This naming convention is compatible with Compass spriting.&lt;/p&gt;

&lt;p&gt;For our hover state, we copy the code for the normal state and remove the effects on the button icon. Append the code to &lt;code&gt;$button_sprites&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// button.scss
/* …snip… */

$button_sprites: magick-sprite('button/normal', magick-canvas($button_width, $button_height,
  /* …snip… */
)) magick-sprite('button/hover', magick-canvas($button_width, $button_height,
  magick-fill(
    magick-linear-gradient(
      $theme1,
      $theme2
    )
  )
  magick-corners(10px)
  magick-border($theme2, 10px, 1px)
  magick-compose(magick-canvas('icon.png'), 5px, 50%)
));

body { }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We end up with two files: &lt;code&gt;button/normal.png&lt;/code&gt; and &lt;code&gt;button/hover.png&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Finally, copy the code for the hover state and play with the gradient stops to achieve a pressed button look. Append the code to &lt;code&gt;$button_sprites&lt;/code&gt; again:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// button.scss
/* …snip… */

$button_sprites: magick-sprite('button/normal', magick-canvas($button_width, $button_height,
  /* …snip… */
)) magick-sprite('button/hover', magick-canvas($button_width, $button_height,
  /* …snip… */
)) magick-sprite('button/active', magick-canvas($button_width, $button_height,
  magick-fill(
    magick-linear-gradient(
      darken($theme2, 10%),
      mix($theme1, $theme2)
    )
  )
  magick-corners(10px)
  magick-border($theme2, 10px, 1px)
  magick-compose(magick-canvas('icon.png'), 5px, 50%)
));

body { }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We are now ready to create a single image for our 3-state button. It is as easy as adding an &lt;code&gt;import&lt;/code&gt; line above the &lt;code&gt;body&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// button.scss
/* …snip… */

@import 'button/*.png';

body { }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/jg8Ao.png" alt="Example 9"/&gt;&lt;/p&gt;

&lt;h2&gt;Using the Button Sprite&lt;/h2&gt;

&lt;p&gt;The final step is to turn an &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt; element into a button:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;a {
  display: block;
  width: $button_width;
  height: $button_height;
  line-height: $button_height;
  text-align: center;
  text-decoration: none;
  color: #fff;

  @include button-sprite(normal);

  &amp;amp;:hover  { @include button-sprite(hover); }
  &amp;amp;:active { @include button-sprite(active); }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;button-sprite&lt;/code&gt; mixins are generated by Compass and allow us to easily switch the &lt;code&gt;background-position&lt;/code&gt; property to select the desired button state. The result is:&lt;/p&gt;

&lt;iframe style="width: 100%; height: 200px" src="http://jsfiddle.net/aFNFu/embedded/result/"&gt;&lt;/iframe&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;There are many more features available in Magick. Check out the &lt;a href="https://github.com/StanAngeloff/compass-magick/blob/master/APIs.md"&gt;list of all available commands&lt;/a&gt; for a comprehensive reference.&lt;/p&gt;

&lt;p&gt;Leave a comment if you have any questions or suggestions and visit the &lt;a href="https://github.com/StanAngeloff/compass-magick"&gt;official Github&lt;/a&gt; page of the project for up-to-date information and links to other resources.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/5040777009</link><guid>http://blog.angeloff.name/post/5040777009</guid><pubDate>Fri, 29 Apr 2011 16:41:00 +0300</pubDate></item><item><title>Compass Magick Tutorial - Part 1</title><description>&lt;h2&gt;Introduction&lt;/h2&gt;

&lt;p&gt;We have all been there - you release a cool new website with all the goodies of CSS3 just to find several weeks later your Customer wants you to support Internet Explorer as well. It seems solid backgrounds don&amp;#8217;t cut it.&lt;/p&gt;

&lt;p&gt;There are also cases where CSS3 isn&amp;#8217;t the right solution, whether you have custom shapes or other elements of your design you end up creating images for (SVG is a good solution for these cases, but there&amp;#8217;s that big 10-year old elephant sitting in the middle of the room again).&lt;/p&gt;

&lt;p&gt;Compass Magick tries to solve these issues by allowing you to dynamically generate images from your Compass projects taking full advantage of variables, mixins, etc.&lt;/p&gt;

&lt;!-- more --&gt;

&lt;h2&gt;History&lt;/h2&gt;

&lt;p&gt;The initial version of the project relied on RMagick for all image manipulation. There were many quirks: gradients were not working properly, per-pixel manipulation was difficult and much more.
While I haven&amp;#8217;t worked with Ruby myself before, it also became apparent after some time RMagick was a big no-no in Ruby&amp;#8217;s land. The project is not actively maintained (last commit at the time of writing this post was on October 25, 2010) and compiling it is a big pain (especially on Windows/Cygwin).&lt;/p&gt;

&lt;p&gt;Searching for an alternative solution, I stumbled upon &lt;a href="http://www.aaronrussell.co.uk/blog/cross-browser-rgba-support/"&gt;compass-rgba&lt;/a&gt;, a simple plugin for generating 1x1 images and saving them as PNG files, the goal being to support IE7 with its missing implementation for &lt;code&gt;rgba&lt;/code&gt;.
The plugin is using &lt;a href="https://github.com/wvanbergen/chunky_png"&gt;ChunkyPNG&lt;/a&gt;, a pure Ruby library for reading and writing PNG images. Upon further investigation, I found it has very good support for per-pixel access and was a breeze to install. The author, Willem van Bergen, is also actively maintaining it, constantly adding new features and releasing new versions.&lt;/p&gt;

&lt;h2&gt;Installation&lt;/h2&gt;

&lt;p&gt;Moving away from the brief history lesson, installing Compass Magick is simple via RubyGems. &lt;a href="http://beta.compass-style.org"&gt;Compass&lt;/a&gt; ~&amp;gt; 0.11.beta.5 and &lt;a href="https://github.com/wvanbergen/chunky_png"&gt;ChunkyPNG&lt;/a&gt; ~&amp;gt; 1.1.0 are required.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install compass-magick
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can optionally install OilyPNG ~&amp;gt; 1.0.0 to speed up ChunkyPNG. Oily is a native mixin:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install oily_png
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you have an existing project, you can start using Compass Magick by requiring the plugin from your Compass configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Add as the the first line in your config.rb
require 'magick'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you are starting a new Compass project, to include Magick add &lt;code&gt;-r magick&lt;/code&gt; to the command line:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;compass create -r magick my_project
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;A Surface&lt;/h2&gt;

&lt;p&gt;Everything starts with a canvas:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;magick-canvas(320px, 200px)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The code above creates a new Magick canvas and initialises its width and height. The canvas is fully transparent. This line by itself doesn&amp;#8217;t do much, so let&amp;#8217;s add it as a page background:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// intro.scss
body {
  background: transparent magick-canvas(320px, 200px);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Once you compile the source &lt;code&gt;intro.scss&lt;/code&gt;, have a look at the produced &lt;code&gt;.css&lt;/code&gt; - you should see a Base64 encoded Data URL of what is essentially a 320x200 transparent PNG serialised:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;body {
  background: transparent url('data:image/png;base64,…');
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Commands&lt;/h2&gt;

&lt;p&gt;You can perform drawing operations on a Magick canvas just like any other canvas. Commands are executed in the order they are specified in the source file. There are commands for drawing borders, generating gradients and much more. To keep things simple, let&amp;#8217;s turn our transparent canvas yellow:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// intro.scss
body {
  background: transparent magick-canvas(320px, 200px,
    magick-fill(yellow)
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/j1KUk.png" alt="Example 1"/&gt;&lt;/p&gt;

&lt;p&gt;…and just like that we turned our canvas yellow. &lt;code&gt;magick-fill&lt;/code&gt; accepts semi-transparent colors and most importantly of all, variables:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// intro.scss
$theme1: yellow;
$theme2: blue;

body {
  background: transparent magick-canvas(320px, 200px,
    magick-fill($theme1)
    magick-fill(rgba($theme2, 0.5))
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/3o3yy.png" alt="Example 2"/&gt;&lt;/p&gt;

&lt;p&gt;What happened there? We created a 320x200 canvas and executed two commands on it:&lt;/p&gt;

&lt;ol&gt;&lt;li&gt;Fill the entire canvas with &lt;code&gt;$theme1&lt;/code&gt; (yellow)&lt;/li&gt;
&lt;li&gt;Fill the entire canvas again with &lt;code&gt;$theme2&lt;/code&gt; (blue), but at 50% opacity&lt;/li&gt;
&lt;/ol&gt;&lt;h2&gt;Types&lt;/h2&gt;

&lt;p&gt;Compass Magick has support for linear gradients. Gradients are not drawing functions, but fill types. You don&amp;#8217;t apply a gradient directly on the canvas, rather you use it as an argument to a drawing function, one like &lt;code&gt;magick-fill&lt;/code&gt; for example. Let&amp;#8217;s create a very simple top-to-bottom gradient and apply it on our canvas from the previous examples:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// intro.scss
$theme1: red;
$theme2: maroon;

body {
  background: transparent magick-canvas(320px, 200px,
    magick-fill(
      magick-linear-gradient(
        $theme1,
        $theme2
      )
    )
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/V9pb3.png" alt="Example 3"/&gt;&lt;/p&gt;

&lt;h2&gt;Going Further&lt;/h2&gt;

&lt;p&gt;Compass Magick has a very powerful &lt;a href="https://github.com/StanAngeloff/compass-magick/blob/master/APIs.md"&gt;set of functions&lt;/a&gt;. Adding corners and a border is trivial and we can quickly turn our canvas into a button:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// intro.scss
$theme1: red;
$theme2: maroon;

$button_width:  320px;
$button_height: 24px;

body {
  background: transparent magick-canvas($button_width, $button_height,
    magick-fill(
      magick-linear-gradient(
        $theme1,
        $theme2
      )
    )
    magick-corners(10px)
    magick-border($theme2, 10px, 1px)
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/hBLg0.png" alt="Example 4"/&gt;&lt;/p&gt;

&lt;h2&gt;Saving the Canvas&lt;/h2&gt;

&lt;p&gt;Unfortunately Base64 encoded Data URLs are not supported by all browsers and versions. To save the button we generated on disk, we first need to alter our Compass configuration:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Add to config.rb
images_dir = 'images'
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can now wrap everything in &lt;code&gt;magick-sprite&lt;/code&gt; to write the output on disk:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;// intro.scss
/* …snip… */

body {
  background: transparent magick-sprite('button', magick-canvas($button_width, $button_height,
    /* …snip… */
  ));
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The result will be &lt;code&gt;button.png&lt;/code&gt; in the configured &lt;code&gt;images_dir&lt;/code&gt;. The file is optimised for best compression, but you could further post-process it with tools like &lt;a href="http://optipng.sourceforge.net/"&gt;OptiPNG&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;This post is just an introduction to Compass Magick. There are many more features available, some of which include image composing, cropping, masking, drop shadows and pattern generation.
Check out the &lt;a href="https://github.com/StanAngeloff/compass-magick/blob/master/APIs.md"&gt;list of all available commands&lt;/a&gt; for a comprehensive reference.&lt;/p&gt;

&lt;p&gt;I hope you found this short walk-through useful.
Leave a comment if you have any questions or suggestions and visit the &lt;a href="https://github.com/StanAngeloff/compass-magick"&gt;official Github&lt;/a&gt; page of the project for up-to-date information and links to other resources.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: &lt;a href="http://blog.angeloff.name/post/5040777009/compass-magick-tutorial-part-2"&gt;Part 2 is now available&lt;/a&gt;&lt;/p&gt;</description><link>http://blog.angeloff.name/post/4659977659</link><guid>http://blog.angeloff.name/post/4659977659</guid><pubDate>Sat, 16 Apr 2011 17:47:00 +0300</pubDate></item><item><title>Yoke: a drop-in, quick and dirty alternative to Sprockets</title><description>&lt;p&gt;In local development, I tend to create separate pieces of JavaScript for every controller, model, view, etc. I loved the idea of Sprockets &amp;#8212; grab all these files and stitch them together. While it worked well for a while (on the command-line), I got fed up with how slow it runs, especially on Ruby under Cygwin.&lt;br/&gt;
So, what to do? Node.js of course. Why? It&amp;#8217;s fast, it&amp;#8217;s super-easy to install and writing a script on top of it is a breeze. Meet Yoke:&lt;/p&gt;

&lt;script src="https://gist.github.com/840581.js"&gt;&lt;/script&gt;&lt;p&gt;To use, copy the script above on &lt;code&gt;$PATH&lt;/code&gt; and then:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;yoke [-I path[ -I path]...] input.js &amp;gt; output.js
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;In most cases, you would just need to replace your existing &lt;code&gt;sprocketize&lt;/code&gt; command with &lt;code&gt;yoke&lt;/code&gt;. Both &lt;code&gt;&amp;lt;file&amp;gt;&lt;/code&gt; and &lt;code&gt;"file"&lt;/code&gt; requires are supported.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/3465035915</link><guid>http://blog.angeloff.name/post/3465035915</guid><pubDate>Wed, 23 Feb 2011 18:02:22 +0200</pubDate></item><item><title>A quick and dirty way to use namespaces in CoffeeScript</title><description>&lt;script src="https://gist.github.com/731816.js"&gt;&lt;/script&gt;&lt;p&gt;There you have it &amp;#8212; should work both in the browser and on the server.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/2132544289</link><guid>http://blog.angeloff.name/post/2132544289</guid><pubDate>Tue, 07 Dec 2010 16:07:47 +0200</pubDate></item><item><title>Extract changed files from Git and prepare a deployment (Bash script)</title><description>&lt;p&gt;So, you have moved over to Git. Well done! You have big plans for your future deployment process &amp;#8212; it is going to be automated and thoroughly tested&amp;#8230; but you still have to support your existing legacy products. If you are like me, you most likely started with simple FTP copies (oh, this takes me back). I moved over from SVN and TortoiseSVN was my primary choice for a desktop client. After each deployment, I would create an SVN tag so next time I can get a list of all changed files. In TortoiseSVN it&amp;#8217;s as simple as selecting two revisions while holding down the Shift key and doing a &lt;em&gt;Compare Revisions&lt;/em&gt;. From the new window you can export all changed files to a new location. If your project in 100MB in size, you only ever have to deal with modified files on subsequent updates. Simple (or so I thought back then).&lt;/p&gt;

&lt;p&gt;Moving over to Git has thought me many things. I used to love &lt;a href="http://blog.angeloff.name/post/1004704485/alternative-cygwin-terminal-shell"&gt;my Cygwin console&lt;/a&gt; even before the switch and I&amp;#8217;ve learnt to do pretty much every daily task in it. But the one thing I really needed and didn&amp;#8217;t have with Git was an option to copy modified files from the working tree between two commits. It wasn&amp;#8217;t available on the command line, nor in any of the &lt;a href="http://cola.tuxfamily.org/"&gt;clients&lt;/a&gt; &lt;a href="http://sourceforge.net/projects/gitextensions/"&gt;I&amp;#8217;ve tried&lt;/a&gt; &lt;a href="http://code.google.com/p/tortoisegit/"&gt;so far&lt;/a&gt;. So having been playing with shell scripts for a few weeks, I decided to put one together which would do just that:&lt;/p&gt;

&lt;script src="https://gist.github.com/664680.js"&gt;&lt;/script&gt;&lt;p&gt;Paste the above in a script on your &lt;code&gt;$PATH&lt;/code&gt;. Using &lt;code&gt;gitk&lt;/code&gt; or another tool find the first commit you want to include in your extract. Invoke the script as below:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ git-extract initial_hash_of_first_commit_to_include..HEAD
Do you wish to remove '.deployments' first? [Y/n]
  Purging '.deployments'...
  Done.
Processing 10 files... 100.00%
Done.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A new directory &lt;code&gt;.deployments&lt;/code&gt; will be created with all files that have changed in the given commits range. If files were deleted, a &lt;code&gt;.delete&lt;/code&gt; file will be generated and you have to handle these manually.&lt;/p&gt;

&lt;p&gt;I haven&amp;#8217;t found a better solution yet, but I am sure there is a &lt;em&gt;Git way&lt;/em&gt; to do just what I am after. This script is a hack to get the job done.&lt;/p&gt;

&lt;p&gt;Leave a comment if you found this post useful. Fork &lt;a href="https://gist.github.com/664680"&gt;the Gist&lt;/a&gt; and modify it to suit your needs.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/1490030701</link><guid>http://blog.angeloff.name/post/1490030701</guid><pubDate>Fri, 05 Nov 2010 22:34:00 +0200</pubDate><category>git</category><category>bash</category><category>extract</category></item><item><title>Vim 7 on Red Hat Enterprise Linux (RHEL)</title><description>&lt;p&gt;Following my &lt;a href="http://tumblr.com/xskltn6s1"&gt;last post&lt;/a&gt; I moved on to installing Vim 7.x as the one that comes with RHEL 4 is pretty outdated (6.x).&lt;/p&gt;

&lt;h2&gt;Vim 7.2 from SVN&lt;/h2&gt;

&lt;p&gt;Tested on RHEL 4 i386:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cd ~
$ svn co &lt;a href="https://vim.svn.sourceforge.net/svnroot/vim/vim7"&gt;https://vim.svn.sourceforge.net/svnroot/vim/vim7&lt;/a&gt;
$ cd vim7
$ ./configure --prefix=/usr --with-features=huge --disable-gui --without-x --enable-rubyinterp --enable-cscope --enable-multibyte
$ make &amp;amp;&amp;amp; make install
$ vim --version
VIM - Vi IMproved 7.2 (2008 Aug 9)
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Vim 7.3 from Mercurial&lt;/h2&gt;

&lt;p&gt;Tested on RHEL 5 x86_64:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cd ~
$ yum install hg ncurses-devel
$ hg clone &lt;a href="https://vim.googlecode.com/hg/"&gt;https://vim.googlecode.com/hg/&lt;/a&gt; vim
$ cd vim
$ ./configure --prefix=/usr --with-features=huge --disable-gui --without-x --enable-rubyinterp --enable-cscope --enable-multibyte
$ make &amp;amp;&amp;amp; make install
$ vim --version
VIM - Vi IMproved 7.3 (2010 Aug 15)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;RHEL 4 comes with &lt;code&gt;up2date&lt;/code&gt;. I tried &lt;code&gt;-i mercurial&lt;/code&gt; and &lt;code&gt;-i hg&lt;/code&gt;, but both failed. Vim offers an archived download so you can skip steps 3-4 above and instead use:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;[..]
$ wget &lt;a href="ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2"&gt;ftp://ftp.vim.org/pub/vim/unix/vim-7.3.tar.bz2&lt;/a&gt;
$ tar xjvf vim-7.3.tar.bz2
$ cd vim73
[..]
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Let me know if this post helped you or if you had to install any additional libraries.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/1319772540</link><guid>http://blog.angeloff.name/post/1319772540</guid><pubDate>Fri, 15 Oct 2010 14:53:00 +0300</pubDate></item><item><title>Git on Red Hat Enterprise Linux (RHEL) 4 i386</title><description>&lt;p&gt;I have been struggling with this for a while now. There is no &lt;code&gt;yum&lt;/code&gt; to begin with and &lt;code&gt;up2date&lt;/code&gt; doesn&amp;#8217;t help much either (no &lt;code&gt;git-*&lt;/code&gt; packages). Here is a quick solution:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cd ~
$ wget &lt;a href="http://packages.sw.be/git/git-1.7.3-1.el4.rf.i386.rpm"&gt;http://packages.sw.be/git/git-1.7.3-1.el4.rf.i386.rpm&lt;/a&gt;
$ wget &lt;a href="http://packages.sw.be/git/perl-Git-1.7.3-1.el4.rf.i386.rpm"&gt;http://packages.sw.be/git/perl-Git-1.7.3-1.el4.rf.i386.rpm&lt;/a&gt;
$ rpm -ivh --nodeps git-1.7.3-1.el4.rf.i386.rpm perl-Git-1.7.3-1.el4.rf.i386.rpm
$ git --version
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can browse &lt;a href="http://packages.sw.be/git/"&gt;packages.sw.be/git/&lt;/a&gt; for the latest packages and update the above accordingly.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/1319580433</link><guid>http://blog.angeloff.name/post/1319580433</guid><pubDate>Fri, 15 Oct 2010 14:04:00 +0300</pubDate></item><item><title>MinTTY at your fingertips</title><description>&lt;p&gt;How often do you need to get in and out of your terminal as quickly as possible? I use &lt;a href="http://www.cygwin.com"&gt;Cygwin&lt;/a&gt; for Linux emulation under Windows and &lt;a href="http://code.google.com/p/mintty/"&gt;MinTTY&lt;/a&gt; as my terminal of choice. MinTTY is great as it supports semi-transparent backgrounds and fullscreen mode (and lots more, be sure to check out the homepage). It is so tiny I don&amp;#8217;t mind having a copy of it running at all times, however it bugs me when I see its icon on the taskbar. The following is an &lt;a href="http://www.autohotkey.com/"&gt;AutoHotkey&lt;/a&gt; script which launches a new MinTTY window, if one is not started already, sets it up in fullscreen mode and lets you do your work until you press &lt;strong&gt;Win+C&lt;/strong&gt; again to send it to the background and remove all traces of it on your desktop.&lt;/p&gt;

&lt;script src="http://gist.github.com/575520.js"&gt;&lt;/script&gt;&lt;p&gt;If you haven&amp;#8217;t used AutoHotkey before make sure you download a copy. You most definitely will find some use for it.&lt;/p&gt;

&lt;p&gt;As for the script, it is possible to tweak it so the window is only taking half the screen and slides in from the top &lt;em&gt;(ah, Mac envy)&lt;/em&gt;. I leave that for you to figure out.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/1104619682</link><guid>http://blog.angeloff.name/post/1104619682</guid><pubDate>Sat, 11 Sep 2010 23:38:00 +0300</pubDate></item><item><title>cd with bookmarks and auto-completion for Zsh</title><description>&lt;p&gt;If you are like me, you do a lot of terminal work and &lt;code&gt;cd&lt;/code&gt; is your friend (or enemy). I was getting really tired to &lt;code&gt;cd /home/stan/projects/important-project/src/&lt;/code&gt; every time I launch my shell. It&amp;#8217;s bad enough when you have one project to work on, but as things get scattered, you tend to do more directory traversing than actual coding.&lt;/p&gt;

&lt;p&gt;Up until recently I was using &lt;a href="http://code.google.com/p/go-tool/"&gt;go-tool&lt;/a&gt;. From the website:&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;code&gt;go&lt;/code&gt; is a small shell command for changing directories quickly. Typically you have a set of directories that you work in. Typing out the names of those dirs in full can be tedious. &lt;code&gt;go&lt;/code&gt; allows you to give a shortcut name for a directory &amp;#8212; say &lt;code&gt;ko&lt;/code&gt; for &lt;code&gt;D:\trentm\main\Apps\Komodo-devel&lt;/code&gt; [..]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It&amp;#8217;s a great tool, but it doesn&amp;#8217;t work with Zsh out-of-the box (trivial to modify the Bash example to fake it). It&amp;#8217;s also based on Python and can be very slow when using it in a fresh terminal window. I really needed a solution that was native and didn&amp;#8217;t require a lot of effort to set up.&lt;/p&gt;

&lt;h2&gt;The &amp;#8216;Thin&amp;#8217; Option&lt;/h2&gt;

&lt;p&gt;I stumbled upon &lt;a href="http://ivan.fomentgroup.org/blog/2010/01/29/zsh-bookmarks-for-cd-change-directory-with-completion/"&gt;Ivan Čukić&amp;#8217;s excellent blog post&lt;/a&gt;. It&amp;#8217;s so cool, I couldn&amp;#8217;t resist trying it. I took the functions and tweaked the path where the database is stored and how it is accessed. This is a better solution compared to &lt;code&gt;go&lt;/code&gt; and as a bonus it also offers auto-completion:&lt;/p&gt;

&lt;script src="http://gist.github.com/558158.js"&gt;&lt;/script&gt;&lt;h3&gt;How to Use It&lt;/h3&gt;

&lt;p&gt;Paste the above code at the bottom of your &lt;code&gt;~/.zshrc&lt;/code&gt; file. Restart your terminal and run &lt;code&gt;cdb_edit&lt;/code&gt;. This should bring up an empty buffer in your &lt;code&gt;$EDITOR&lt;/code&gt;. To define shortcuts, use &lt;code&gt;shortcut  absolute/path&lt;/code&gt;. Here is an example file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cdb_edit

public    /cygdrive/d/Workspace/public/
projects  /cygdrive/d/Workspace/projects/
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Try it Out&lt;/h3&gt;

&lt;p&gt;Using the database above as an example:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;~ $ cdb public
/cygdrive/d/Workspace/public/ $ 
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;The &amp;#8216;Fat&amp;#8217; Option&lt;/h2&gt;

&lt;p&gt;If you are looking for something more sophisticated which wouldn&amp;#8217;t involve maintaining a database using vim then you need &lt;a href="http://github.com/flavio/jump"&gt;Jump, a bookmarking system for the bash and zsh shells&lt;/a&gt;. It&amp;#8217;s a great tool and quite easy to install too:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ gem install jump
$ cp `gem contents jump | grep zsh` ~/.jump_shell_driver
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and a line in your &lt;code&gt;~/.zshrc&lt;/code&gt; to make the magic happen: &lt;code&gt;source ~/.jump_shell_driver&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Further instructions (incl. Bash) and a tutorial is available on the project&amp;#8217;s &lt;a href="http://github.com/flavio/jump"&gt;GitHub page&lt;/a&gt;.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/1027007406</link><guid>http://blog.angeloff.name/post/1027007406</guid><pubDate>Sun, 29 Aug 2010 00:00:00 +0300</pubDate></item><item><title>Building and using node.js on Windows (32 and 64-bit) through Cygwin</title><description>&lt;a href="http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows)"&gt;Building and using node.js on Windows (32 and 64-bit) through Cygwin&lt;/a&gt;: &lt;p&gt;I have been going through the existing GitHub page for building &lt;a href="http://nodejs.org"&gt;node.js&lt;/a&gt; on &lt;a href="http://www.cygwin.com"&gt;Cygwin&lt;/a&gt;/Windows adding my own comments/steps and missing packages. I believe this is now a full set of instructions that should get you cracking pretty quickly from scratch.&lt;/p&gt;

&lt;blockquote&gt;
  &lt;p&gt;&lt;a href="http://github.com/ry/node/wiki/Building-node.js-on-Cygwin-(Windows)"&gt;Building and using node.js on Windows (32 and 64-bit) through Cygwin&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;</description><link>http://blog.angeloff.name/post/1010207199</link><guid>http://blog.angeloff.name/post/1010207199</guid><pubDate>Wed, 25 Aug 2010 22:44:11 +0300</pubDate></item><item><title>Alternative Cygwin terminal &amp; shell</title><description>&lt;p&gt;I just realised many, if not most, Cygwin users stick with their default terminal which is the &lt;em&gt;Cygwin Bash Shell&lt;/em&gt;. I never understood why this is the default with each installation. It is no better than &lt;em&gt;Command Prompt&lt;/em&gt; &amp;#8212; horizontal window resizing is out of the question, custom fonts are limited and mouse support is, well&amp;#8230; missing.&lt;/p&gt;

&lt;h2&gt;Terminal&lt;/h2&gt;

&lt;p&gt;If you have used PuTTY to connect to remote machines, you would love &lt;a href="http://code.google.com/p/mintty/"&gt;&lt;strong&gt;MinTTY&lt;/strong&gt;&lt;/a&gt;. It is based on code from PuTTY 0.60. Features as seen on the project&amp;#8217;s homepage include:&lt;/p&gt;

&lt;ul&gt;&lt;li&gt;Native Windows user interface that tries to keep things simple.&lt;/li&gt;
&lt;li&gt;Support for UTF-8, CJK fonts, and Windows IMEs.&lt;/li&gt;
&lt;li&gt;Drag &amp;amp; drop and copy &amp;amp; paste of text, files and folders. (Files and folders are inserted as quoted filenames.)&lt;/li&gt;
&lt;li&gt;Extensive mouse support, e.g. mousewheel scrolling in less and opening files and URLs with Ctrl+click&lt;/li&gt;
&lt;li&gt;Window transparency, including glass effect on Vista and 7.&lt;/li&gt;
&lt;li&gt;Small program size and  uick scrolling.&lt;/li&gt;
&lt;/ul&gt;&lt;p&gt;&lt;img src="http://i.imgur.com/EBpvY.png" alt="MinTTY preview"/&gt;&lt;/p&gt;

&lt;h2&gt;Shell&lt;/h2&gt;

&lt;p&gt;I encourage you to try &lt;a href="http://www.zsh.org/"&gt;&lt;strong&gt;Zsh&lt;/strong&gt;&lt;/a&gt; as an alternative to Bash (the default). Bash is fine, but if you are looking for better history management, lots of plug-ins and options for customisations you need to move on. Check out &lt;a href="http://github.com/robbyrussell/oh-my-zsh"&gt;oh-my-zsh&lt;/a&gt; for a collection of such add-ons.&lt;/p&gt;

&lt;p&gt;You can install MinTTY and ZSH using Cygwin&amp;#8217;s &lt;a href="http://www.cygwin.com/setup.exe"&gt;setup.exe&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;MinTTY at your fingertips&lt;/h3&gt;

&lt;p&gt;Having a terminal keystroke away is essential in my day-to-day work. I need to be able to quickly get in and out of it &amp;#8212; &lt;a href="http://blog.angeloff.name/post/1104619682/mintty-at-your-fingertips"&gt;read how to do it&lt;/a&gt;.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/1004704485</link><guid>http://blog.angeloff.name/post/1004704485</guid><pubDate>Tue, 24 Aug 2010 22:20:00 +0300</pubDate></item><item><title>"If you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program."</title><description>“If you need more than 3 levels of indentation, you’re screwed anyway, and should fix your program.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Linus Torvalds (via &lt;a href="http://fooyeahcode.tumblr.com/"&gt;fooyeahcode&lt;/a&gt;) (via &lt;a href="http://seanmonstar.com/" class="tumblr_blog"&gt;seanmonstar&lt;/a&gt;)&lt;/em&gt;</description><link>http://blog.angeloff.name/post/994484364</link><guid>http://blog.angeloff.name/post/994484364</guid><pubDate>Mon, 23 Aug 2010 00:12:55 +0300</pubDate></item><item><title>node-paperserve - Quick and dirty web server from your working directory</title><description>&lt;p&gt;&lt;strong&gt;Install&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ npm install paperserve
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;Usage&lt;/strong&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;paperserve [path-to-serve]

  -p, --port [PORT]  set the port to listen on, default 8000
  -q, --quiet        turn off any logging, default false
  -h, --help         display this help message
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here&amp;#8217;s what the output looks like:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;gt;&amp;gt;&amp;gt; paperserve: running on port 8000, serving from '/cygdrive/d/Workspace/public/node-paperserve'
&amp;gt;&amp;gt;&amp;gt; paperserve:   Press Ctrl-C to stop.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Source code can be found on &lt;a href="http://github.com/StanAngeloff/node-paperserve"&gt;GitHub&lt;/a&gt;. As for the motivation behind the project &amp;#8212; let&amp;#8217;s just say I prefer JavaScript to &lt;a href="http://blog.angeloff.name/post/931456447/in-need-of-a-simple-web-server"&gt;Python&lt;/a&gt;.&lt;/p&gt;</description><link>http://blog.angeloff.name/post/966860661</link><guid>http://blog.angeloff.name/post/966860661</guid><pubDate>Tue, 17 Aug 2010 14:57:21 +0300</pubDate></item><item><title>Cygwin, CoffeeScript &amp; Growl for Windows integration</title><description>&lt;p&gt;Let&amp;#8217;s start by adjusting where &lt;a href="http://nodejs.org/"&gt;node.js&lt;/a&gt; looks for libraries. We will need this later on when we use the newly implemented &lt;a href="http://github.com/jashkenas/coffee-script/commit/b1b78dca47c83986c9654ec51fd9993f90a795e5"&gt;&lt;code&gt;-r&lt;/code&gt;&lt;/a&gt; command-line switch in CoffeeScript. Open up your shell init file, in my instance &lt;code&gt;~/.zshrc&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ vim ~/.zshrc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and add a line in there:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export NODE_PATH="/cygdrive/d/Workspace/public/coffee-script/.coffee_libraries:$NODE_PATH"
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The path can be anywhere on your system so adjust it accordingly. Let&amp;#8217;s go ahead and create a file inside &lt;code&gt;.coffee_libraries&lt;/code&gt;, name it &lt;code&gt;growlnotify-windows.coffee&lt;/code&gt; and paste this code inside of it:&lt;/p&gt;

&lt;script src="http://gist.github.com/558161.js"&gt;&lt;/script&gt;&lt;p&gt;We also need a &lt;a href="http://i.imgur.com/SaUrK.png"&gt;proper icon&lt;/a&gt; &amp;#8212; save it in the script folder as &lt;code&gt;icon-coffee-cup.png&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Next time you run the &lt;code&gt;coffee&lt;/code&gt; command line utility, append &lt;code&gt;-r growlnotify-windows&lt;/code&gt; like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ coffee -r growlnotify-windows -wc src/
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;and when the compiler encounters an exception, you will receive a nice UI prompt like this:&lt;/p&gt;

&lt;p&gt;&lt;img src="http://i.imgur.com/M2OiE.png" alt="Smokestack theme preview"/&gt;&lt;/p&gt;

&lt;p&gt;Happy coding!&lt;/p&gt;</description><link>http://blog.angeloff.name/post/962830463</link><guid>http://blog.angeloff.name/post/962830463</guid><pubDate>Mon, 16 Aug 2010 17:24:00 +0300</pubDate></item></channel></rss>

