Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc
| #!/bin/bash | |
| # <UDF name="ssh_key" Label="Paste in your public SSH key" default="" example="" optional="false" /> | |
| # root ssh keys | |
| mkdir /root/.ssh | |
| echo $SSH_KEY >> /root/.ssh/authorized_keys | |
| chmod 0700 /root/.ssh | |
| # update to latest |
Install Homebrew
http://mxcl.github.com/homebrew/
/usr/bin/ruby -e "$(curl -fsSL https://raw.github.com/gist/323731)"
brew help
cd ~
mate .bashrc
| puts "Called from: #{File.expand_path(File.dirname("."))}" | |
| puts __FILE__ | |
| puts "last: " + File.dirname(__FILE__).split("/").last | |
| puts pwd = File.expand_path(File.dirname(__FILE__)) | |
| puts "parent dir:" | |
| ar = pwd.split("/") | |
| puts "/#{ar[ar.length-2]}" |
#Four Ways To Do Pub/Sub With jQuery and jQuery UI (in the future)
Between jQuery 1.7 and some of work going into future versions of jQuery UI, there are a ton of hot new ways for you to get your publish/subscribe on. Here are just four of them, three of which are new.
(PS: If you're unfamiliar with pub/sub, read the guide to it that Julian Aubourg and I wrote here http://msdn.microsoft.com/en-us/scriptjunkie/hh201955.aspx)
##Option 1: Using jQuery 1.7's $.Callbacks() feature:
| @media only screen and (min-device-width: 320px) and (max-device-width: 1024px) | |
| html | |
| -webkit-text-size-adjust: none |
| static NSString* const kAWSAccessKey = @"__ACCESS__KEY__"; // From AWS Developer portal | |
| static NSString* const kAWSSecretKey = @"__SECRET__KEY__"; // From AWS Developer portal | |
| static NSString* const kAWSAssociateTag = @"examp-99"; // Can be a bogus tag in the format xxxxx-XX (x being a letter and X being a number) | |
| /* NSString category for HMAC and URL string encoding */ | |
| @interface NSString (AWSAdditions) | |
| - (NSString*)URLEncodedStringForCharacters:(NSString*)characters; | |
| + (NSData*)HMACSHA256EncodedDataWithKey:(NSString*)key data:(NSString*)data; | |
| @end |
| ## Prepare ################################################################### | |
| # Remove RVM | |
| rvm implode | |
| # Ensure your homebrew is working properly and up to date | |
| brew doctor | |
| brew update | |
| ## Install ################################################################### |
| ; Ruby has an awesome feature -- string interpolation. Read about it on the internet. | |
| ; On the other hand, Clojure only has cumbersome Java string formatting, which can not be | |
| ; used without pain after you've tried Ruby. | |
| ; So here's this simple macro that basically allows you to do most things you could do | |
| ; with Ruby string interpolation in Clojure. | |
| (ns eis.stuff | |
| (:require [clojure.string])) |