Archives
Admin / Logout

Adam Merrifield

a picture of me
I am a web designer, theme designer, professional photographer and internet personality. I make many pretty things and I write a lot of content for the internet.

I am one of those guys that, because of the industry I am in, need to be connected at all times. At any given moment you'll find me posting on a forum, updating with twitter, Digging things worthy of attention, uploading pictures, or tagging cool sites.

here i am

seyDoggy Systems:
This is home base, the corporate headquarters, the hub, if you will, seyDoggy.com.

seyDesign news:
these are the RapidWeaver related posts that originally appear in the seyDesign.com blog

Uploads from seyDoggy:
these are the pictures that I upload to flickr

Merrifield Photography:
as a professional photographer I my camera ready at Merrifield-Photography.com.

delicious.com/seydoggy:
these are the websites I want to share or revisit later on. I just tag them on delicious.com.

what i am

I am the owner and operator of seyDoggy Systems, a small theme, code and design outfit based in Kitchener, Ontario, Canada. We primarily develop web based technologies but have begun to dabble in the desktop realm.

what i do

I code like a fool. I design like a fool. I am happiest when I can split my time between the two (though I tire of Photoshop faster then I do TextMate or Terminal), and somehow I have managed to etch out a living doing so.

Keyboard access to all dialog buttons

I have to search for this 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.

No comments | Trackback

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 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 …
No comments | Trackback

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]
No comments | Trackback

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.

No comments | Trackback

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.

No comments | Trackback

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.

via Introducing Minicode / Tobias Bjerrome Ahlin.”

No comments | Trackback

Trojan-Downloader:OSX/Flashback.I

F-Secure has provided a set of directions that’ll let you know if you have been infected. If you have the virus on your machine, F-Secure will walk you through the steps to remove the infection—Threat Description: Trojan-Downloader:OSX/Flashback.I.

| Trackback

iPhone 4 GUI PSD Retina Display

For those looking for an iOS PSD file (though I’d prefer a Pixelmator file), Geoff Teehan has issued an update to theirs that bumps up the ppi for Retina displays—via iPhone 4 GUI PSD Retina Display | Teehan+Lax.

| Trackback

Testing IE7 on Windows 7

You cant install Internet Explorer 7 but you can run it inside Internet Explorer 8 as the rendering engine is bundled by doing the following NOTE: This method also works in IE 9:Open IE8Open >Tools >Developer ToolsSwitch Browser Mode to IE7 and Document Mode to IE7

via How can I install Internet Explorer 7 on Windows 7? – Super User.

| Trackback

GITLAB

Self Hosted Git ManagementFast, secure and stable solution based on Ruby on Rails & Gitolite. Distributed under the MIT License.

via GITLAB.

| Trackback
Powered by RapidWeaver, WP-Blog and WordPress 3.3.2