These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
// jquery invert plugin | |
// by paul irish | |
// some (bad) code from this css color inverter | |
// http://plugins.jquery.com/project/invert-color | |
// some better code via Opera to inverse images via canvas | |
// http://dev.opera.com/articles/view/html-5-canvas-the-basics/#insertingimages | |
// and some imagesLoaded stuff from me | |
// http://gist.github.com/268257 |
These commands are good as of 2011-07-27.
App store http://itunes.apple.com/us/app/xcode/id448457090?mt=12) The download/install takes awhile so start it first. When it finishes downloading you will still need to run it to complete installation.
This will enable Sass+Compass with LiveReload through Guard. (Guard screen cast)
You will also need a browser component to communicate with LiveReload. (browser extension, livereload.js)
If you prefer going through a GUI, that option is available. The following instructions is specific to Mac OS X and it works through the command line.
Note that this is not specific to Rails projects. This can work for any standalone front-end project.
brew update | |
brew versions FORMULA | |
cd `brew --prefix` | |
git checkout HASH Library/Formula/FORMULA.rb # use output of "brew versions" | |
brew install FORMULA | |
brew switch FORMULA VERSION | |
git checkout -- Library/Formula/FORMULA.rb # reset formula | |
## Example: Using Subversion 1.6.17 | |
# |
rvm get head && rvm install 1.9.3-perf --patch falcon,debug | |
echo 'export RUBY_HEAP_MIN_SLOTS=1000000' >> ~/.bash_profile | |
echo 'export RUBY_HEAP_SLOTS_INCREMENT=1000000' >> ~/.bash_profile | |
echo 'export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1' >> ~/.bash_profile | |
echo 'export RUBY_GC_MALLOC_LIMIT=1000000000' >> ~/.bash_profile | |
echo 'export RUBY_HEAP_FREE_MIN=500000' >> ~/.bash_profile | |
rvm use 1.9.3-perf | |
gem install bundler |
var user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9_-]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: false | |
); |