May 2012
4 posts
2 tags
5 tags
5 tags
Convert HTML to HAML in VIM & MACVIM
First you’ll need a version of VIM with ruby support, simplest is the one distributed in HomeBrew,
brew install macvim
Then you’ll need to install a few dependencies:
gem install hpricot erubis ruby_parser
Note, if you’re using RVM, install these into your global gemset:
rvm gemset use global
gem install hpricot erubis ruby_parser
Great,
Now open vim & open a...
April 2012
6 posts
3 tags
Make RVM ignore the patch level (aliases) →
5 tags
ImageOptim & LayerCake ~ photoshop toolkit
Two tools that are brilliant to add to your web toolkit.
First you have LayerCake by MacRabbit ($19.99). Just take your nicely layered PSD artwork, find the ones you want and add a .png / .jpg or .gif extension to the end of the layer name, save the PSD then drop the PSD on LayerCake. It’ll then extract those layers as the desired images.
Next you have ImageOptim (FREE) an awesome...
6 tags
Janus : a minimal setup for VIM users →
Janus: Vim Distribution
This is a distribution of plug-ins and mappings for Vim, Gvim and MacVim.
It is designed to provide minimal working environment using the most popular plug-ins and the most common mappings.
The distribution is completely customisable using a ~/.vimrc.before and ~/.vimrc.after Vim RC files.
Customisations
Uploaded my customizations to :...
March 2012
6 posts
4 tags
OSX GCC Installer →
1 tag
Install Emacs 24 on OSX
Install with,
brew install emacs --cocoa --use-git-head --HEAD
cp -r /usr/local/Cellar/emacs/HEAD/Emacs.app /Applications/
more here
emacs starter kit
Stop (Mis)Using Return False →
Why in most situations, you should be using e.preventDefault() instead of return false. And thoughts on where you should insert that call within the callback function (hint: as early as fits with your program logic).
6 tags
ssh_options[:forward_agent] = true on OSX Lion
On OSX Lion you may encounter problems with doing a capistrano deploy with forward agent, giving you a status code of 32768 and a “Repository not found”
First off forward agent is disabled by default on Lion, you can enable it by editing your /etc/ssh_config file
sudo nano /etc/ssh_config
and changing
# ForwardAgent no
to
ForwardAgent yes
perform a reboot, then add your...
3 tags
February 2012
15 posts
2 tags
Wilson Miner - When We Build
Wilson Miner - When We Build from Build on Vimeo.
6 tags
Force Windows to forget a Network Share
Here’s the scenario, you’ve got a network share hooked up to a password protected drive, when you entered the login details for that share you ticked “remember password” so you don’t have to enter it every time you access that drive.
Times change and you need to use a different username & password, maybe it’s not your machine any more, sounds cool but...
4 tags
Hiding "Postgres" from Login on OSX Lion
After installing Postgres from official installer you’ll soon notice a new user on your Login screen, “Postgres”, to hide it perform the following:
sudo defaults write /Library/Preferences/com.apple.loginwindow HiddenUsersList -array-add postgres
After your log-out and login again you won’t be presented with that user, to reverse this change do:
sudo defaults delete...
3 tags
Node.JS & CoffeeScript on OSX
Simple to do with HomeBrew
brew install node
After which you’ll have Node.JS minus NPM, the package manager. It’ll tell you how to do this by next executing
curl http://npmjs.org/install.sh | sh
You’ll also need to add NODE_PATH to your .bash_profile (or .zshrc file if your using ZSH as a terminal replacement)
NODE_PATH=/usr/local/lib/node_modules
And as these modules...
4 tags
Bret Victor - Inventing on Principle
Bret Victor - Inventing on Principle from CUSEC on Vimeo.
Bio: Bret Victor invents tools that enable people to understand and create. He has designed experimental UI concepts at Apple, interactive data graphics for Al Gore, and musical instruments at Alesis.
1 tag
Why Wordpress asks for FTP details →
Paypal - finding your API Keys
Paypal has to have the most cumbersome site design around, you’ll also notice that the US/Canada and UK sites all have different site layouts which unfortunately the help documentation doesn’t update to reflect this.
To find you API Keys on the US site:
Goto My Account
Then Profile
Then under Account Information, click Request API Credentials
Now you’ve got two choices,...
4 tags
Character Map for OSX
simple, Command-Option-T
3 tags
January 2012
13 posts
4 tags
Sublime Text, tabs as spaces
For me I prefer tabs rendered as spaces and kept down to a tab-size of 2. This is simple to set in Sublime Text.
First off open Sublime, select Preferences / File Settings - User and your personal File Settings preference file will be opened.
Now copy-and-paste this into the file,
"tab_size": 2,
"translate_tabs_to_spaces": true
Bang, from now on all your tabs will be translated as spaces...
4 tags
Package Control for Sublime Text
Sublime Text has some pretty useful plugins available for it allowing you to mould and shape it into just the right editor for your day-to-day use.
These packages you can download and install manually into the package directory, or you can use Package Control which is pretty simple to setup.
First off open Sublime Text, next from the menu-bar select View / Show Console.
From the console...
4 tags
Launch Sublime Text from the command-line
Sublime Text is quite the fancy editor and a definite step up from TextMate, to mirror the same launch from command-line that TextMate gives you just do this from the command-line:
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
Making sure “/usr/local/bin” is in your .bash_profile path
Once in place you should be able to run Sublime...
3 tags
POW is running 99% of my CPU...
With POW 3.2 I’ve been noticing every once in a while it’ll choke and try and burn out my CPU, thankfully there’s a temporary fix with the PRE 4.0 release.
This you can install via
curl get.pow.cx | VERSION=0.4.0-pre sh
More info here
Color Palette
It’s cheesy but pretty usable
6 tags
running pow with apache #2
So when you install pow it also injects a rule in your firewall to route all traffic for port 80 to pow even if pow is shutdown, which kind of interfere’s with OSX Web Sharing MAMP, XAMP or whatever your using.
To get around this you could add:
export POW_DST_PORT=88
Then uninstall & re-install POW, it’ll see you want to use port 88 for POW, not install the firewall route and...
5 tags
running pow & apache together →
“pow and apache sitting in a tree, k i s s i n g”
"Hustle"
‘Hard Drive’ from Eighteen Eighty on Vimeo.
6 tags
VirtualHost overlap on port 443, the first has...
If with Apache you’re getting this error when deploying multiple name-based domains using port 443, or 80 for that matter
VirtualHost overlap on port 443, the first has precedence
Just edit your ports.conf (or httpd.conf)
sudo nano ports.conf
And add these,
NameVirtualHost *:80
NameVirtualHost *:443
Save and test your config again
sudo apache2ctl configtest
This should now...
3 tags
Install Dropbox on Debian Headless
from Terminal
wget https://www.dropbox.com/download?dl=packages/debian/nautilus-dropbox_0.7.1_i386.deb -o nautilus.deb
next install the debian package, and grab any dependencies needed with apt-get
sudo dpkg -i nautilus.deb
sudo apt-get -f install
You will also need python-gpgme for the daemon
sudo aptitude install python-gpgme
If needed, now install the daemon
dropbox start -i
Do...
5 tags
Apple Lion Recovery Assistant
Built right into OS X Lion, Lion Recovery lets you repair disks or reinstall OS X Lion without the need for a physical disc.
To do this all you’ll need is an external drive and the Recovery Tool available here http://support.apple.com/kb/dl1433.
To create an external Lion Recovery, download the Lion Recovery Disk Assistant application. Insert an external drive (no bigger than 1GB),...
December 2011
9 posts
6 tags
Unable to install CS5 in OSX Lion Server 10.7...
If your getting something similar to this error:
-------------------------------------- Summary --------------------------------------
- 0 fatal error(s), 106 error(s), 0 warning(s)
ERROR: DW001: Set payload cancelled status
ERROR: DW049: Payload {007A2A28-D6A8-4D91-9A2B-568FF8052215} has an action "install" but no resultState
ERROR: DW049: Payload {0175676F-8C92-49F2-9131-D0D6AD654B41} has an...
6 tags
Michael Caine - Acting in Film Workshop
Git: Fast-forward Merging
Git: Rebase