Hitch – A resource to add some expressive power to CSS for developers
Amazing CSS at your finger tipsHitch is a small 5.5k gzipped JavaScript library which provides an extension model for CSS and HTML.Including Hitch in your page lets you import and use features like CSS selectors that have only been proposed or HTML widgetry based on microformats. Hitch allows it to be up to you the person writing the page or the stylesheet to determine which features you need, not the users particular browser.
via Hitch – A resource to add some expressive power to CSS for developers.
How to Reverse The Mouse Scrolling Direction in Ubuntu (aka Natural Scrolling)
When Apple releases Mac OSX Lion, one of the changes is the switching of the trackpad/mouse scrolling direction. Instead of scrolling the mouse wheel down to move down the page, you have to scroll up to move down. Apple imported this feature from iOS and call this feature “natural scrolling”. Not everyone love this feature, but if you are one of those who love it, and wish to implement this feature in Ubuntu, here’s how you do it
via How to Reverse The Mouse Scrolling Direction in Ubuntu (aka Natural Scrolling).
Automatically Hide Unity Launcher in Ubuntu 12.04 Precise Pangolin | Liberian Geek
Do you want enable Unity Launcher to automatically hide in Ubuntu 12.04? Well, this brief tutorial is going to show you how to do it. When you upgrade or install Ubuntu 12.04, the launcher is docked on the left and won’t auto-hide. Enabling it will give you some more space to work it.
via Automatically Hide Unity Launcher in Ubuntu 12.04 Precise Pangolin | Liberian Geek.
Keyboard access to all dialog buttons
I have to [search for this](http://hints.macworld.com/article.php?story=20021204061718968) every time I set up a new mac…
I don’t like to use the “mouse” (trackpad in my case) when I don’t have to, but any mac in a default setup makes full keyboard navigation impossible, particularly where dialog boxes are concerned—unless you enable full keyboard access.
Go to `System Preferences > Keyboard > Keyboard Shortcuts` and select the radio button “All Controls” under the option “Full Keyboard Access: In windows and dialogs, press Tab to move keyboard focus between:”
This will allow you to get around just about everywhere just by tabbing and arrowing. When presented with a dialog box with two or more buttons, you will note that aside from the default button (solid blue, activates with return), there is another highlighted button which is activated when the space bar is pressed. You can tab between each button to highlight it, and in each case, the highlighted button will activate with the space bar.
Batch Process with YUI Compressor
The [other day][] I covered how to use YUI Compressor like any old command line for those of us not overly used to working with java classes. This is great for working with single files but I wanted something to iterate through a directory and compress all files of a certain type. So here is a little command line tool for doing that. (Refer to the [previous post][other day] for more background info)
#!/bin/sh # Batch file processor for YUI Compressor. # Save as 'yuibatch' in /usr/local/bin/java with chmod a+x. # REQUIRED: /usr/local/bin/java/yuicompressor.jar # USAGE: yuibatch [type] # Alias to compressor class # (assumes $PATH and $CLASSPATH contain /usr/local/bin/java) alias yui='java com.yahoo.platform.yui.compressor.Bootstrap' # Alternatively # alias yui='java -jar /usr/local/bin/java/yuicompressor.jar' for file in `find . -name "*.$1"` do echo "Compressing $file …" yui --type $1 -o $file $file done
Save this file as ‘yuibatch’ in /usr/local/bin/java with chmod a+x. The script assumes that both `$PATH` and `$CLASSPATH` contain `/usr/local/bin/java` and also assumes that you have yuicompressor.jar installed in `/usr/local/bin/java`. Though you can forgo most of those assumptions and use the alternative alias pointed at where ever your `yuicompressor.jar` exists.
To use it, navigate to the folder in question and type the command `yuibatch [type]` where type is the file type you wish to compress, either `css` or `js`. For example:
user:~$ cd ~/some/folder user:~some/folder$ yuibatch css Compressing ./somefile.css … Compressing ./subfolder/anotherfile.css … user:~/some/folder$ yuibatch js Compressing ./somefile.js … Compressing ./subfolder/anotherfile.js …
[other day]: http://adam.merrifield.ca/2012/05/04/simplified-cli-use-of-yui-compressor/ “Simplified CLI use of YUO Compressor”
Simplified CLI use of YUI Compressor
Let me start by saying I’m not a java guy, “my understanding of java is based on experience, and may be somewhat flawed”…[*][]
I’ve squeezed as much as I can from jsmin. I need to play with the big boy toys so I finally installed YUI Compressor. But not being a java guy I found it’s command line use a bit cumbersome:
$ java -jar /path/to/class/yuicompressor.jar [options] [input] [output]
At the very least I wanted something more like this (with yuicompressor.jar being in my $PATH):
$ java -jar yuicompressor.jar [options] [input] [output]
So, having added the yuicompressor.jar to my `/usr/local/bin/java` directory, I set about adding two new paths to the $CLASSPATH environment variable in my .bash_profile, to find both classes and jar files (so I thought, see disclaimer):
export CLASSPATH="${CLASSPATH}:/usr/local/bin/java/*:/usr/local/bin/java"
Not really sure where I went wrong, but regardless this failed (or more correctly, I failed).
It was at this point that [@therealjaypo][] tipped me off that, “-jar relies on the launch metadata inside the jar. If you find the class it invokes, you can use [$CLASSPATH]“. Ok, cool so now instead of `$ java -jar /path/to/class/yui…` I could just use `$ java com.yahoo.platform.yui.compressor.Bootstrap…`. Things were getting so much… easier?
Then [@therealjaypo][] hit me with the giant stick of obvious, “That’s why the FSM invented ‘alias’
”.
DOH!
So back to the .bash_profile to add this line:
alias yui='java com.yahoo.platform.yui.compressor.Bootstrap'
Now using YUI Compressor is as easy as any other command line app in my $PATH:
$ yui [options] [input] [output]
[@therealjaypo]: http://twitter.com/#!/therealjaypo
[*]: http://twitter.com/#!/simon_clark
ResponsiveSlides.js · Responsive jQuery Slider & Slideshow
“ResponsiveSlides.js is a tiny jQuery plugin that creates a responsive slider using list items inside <ul>. It works with wide range of browsers including all IE versions from IE6 and up. It also adds css max-width support for IE6 and other browsers that don’t natively support it. Only dependency is jQuery (1.4 and up supported) and that all the images are same size.
Biggest difference to other responsive slider plugins is the file size (1kb minified and gzipped) + that this one doesn’t try to do everything. Responsive Slides has basically only two different modes: Either it just automatically fades the images, or operates as a responsive image container with pagination and/or navigation to fade between slides.”
via ResponsiveSlides.js · Responsive jQuery Slider & Slideshow.
SelectNav.js – responsive drop-down menu – pure JavaScript
“SelectNav.js is a JavaScript plugin that lets you convert your website navigation into a select drop-down menu. Used together with media queries it helps you to create a space saving, responsive navigation for small screen devices.
Inspired by TinyNav.js, it was rewritten from scratch to become jQuery independent and customizable.
To see it in action just resize this page and observe the top bar.”
via SelectNav.js – responsive drop-down menu – pure JavaScript.
Minicode / Tobias Bjerrome Ahlin
“Minicode lets you minify your CSS and Javascript files in a simple and fast way from your OS X Dashboard. Drop any CSS or JS file on Minicode and you’ll get a minified version saved to the same directory as the original file, with “.min” appended before the file extension.

