This is now an actual repo:
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir ~/local | |
mkdir ~/node-latest-install | |
cd ~/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local | |
make install # ok, fine, this step probably takes more than 30 seconds... | |
curl https://www.npmjs.org/install.sh | sh |
/*! | |
* jQuery Tiny Pub/Sub for jQuery 1.7 - v0.1 - 27/10/2011 | |
* Based on @cowboy Ben Alman's REALLY tiny pub/sub. | |
* 1.7 specific updates by @addyosmani. | |
* Copyright maintained by @cowboy. | |
* Dual licensed under the MIT and GPL licenses. | |
*/ | |
(function($){ |
#Four Ways To Do Pub/Sub With jQuery 1.7 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:
- Gem parallel_tests
- add to config/database.yml:
test:
database: yourproject_test<%= ENV['TEST_ENV_NUMBER'] %>
- Parallel tests with Cucumber:
function methodIsDefined(fn, obj) { | |
var ns = fn.split('.'); | |
fn = ns.pop(); | |
do { | |
if (!ns[0]) { | |
return typeof obj[fn] === 'function'; | |
} | |
} while(obj = obj[ns.shift()]); | |
return false; | |
} |
{ | |
// http://www.jshint.com/docs/ | |
"jshint_options": { | |
// prohibits the use of explicitly undeclared variables | |
"undef": true, | |
// prohibits the use of a variable before it was defined | |
"latedef": true, |
This article has been given a more permanent home on my blog. Also, since it was first written, the development of the Promises/A+ specification has made the original emphasis on Promises/A seem somewhat outdated.
Promises are a software abstraction that makes working with asynchronous operations much more pleasant. In the most basic definition, your code will move from continuation-passing style:
getTweetsFor("domenic", function (err, results) {
// the rest of your code goes here.
sudo rm -rf /usr/local/mysql* | |
sudo rm -rf /Library/StartupItems/MySQLCOM | |
sudo rm -rf /Library/PreferencePanes/My* | |
sudo rm -rf /Library/Receipts/mysql* | |
sudo rm -rf /Library/Receipts/MySQL* | |
sudo rm -rf /var/db/receipts/com.mysql.* | |
sudo rm /etc/my.cnf | |
sudo sed '/MYSQLCOM=-YES-/d' /etc/hostconfig # remove line MYSQLCOM=-YES- from /etc/hostconfig |
(function( app ) { | |
'use strict'; | |
var ApplicationView = Ember.ContainerView.extend({ | |
childViews: [ 'headerView', 'mainView', 'footerView' ], | |
headerView: Ember.ContainerView.create({ | |
childViews: [ 'titleView', 'createTodoView' ], | |
elementId: 'header', | |
tagName: 'header', | |
titleView: Ember.View.create({ |