This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/sh | |
CUR_DIR=$PWD | |
PID_FILE="$CUR_DIR/node.pid" | |
if [ $1 = "start" ]; then | |
if [ -e $PID_FILE ]; then | |
echo "Node.js is already running." | |
else | |
echo "Starting Node Server" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#via http://jasonseifer.com/2010/04/06/rake-tutorial | |
#via http://codequietly.com/2010/6/rake-tasks-101 - Basics | |
#via http://codequietly.com/2010/6/rake-tasks-102 - Advanced use of Rails ENV | |
# | |
# General Rake | |
# | |
namespace :twitter do | |
desc 'Search Twitter for the parameter you pass in' | |
task :search, :query do |cmd, args| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Best Practices | |
http://stackoverflow.com/questions/907225/object-oriented-javascript-best-practices | |
// Javascript + module Patter | |
http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth | |
// Wrapping Func in JS | |
http://peter.michaux.ca/articles/wrapping-functions-in-javascript | |
// JS for Extreme Performance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
alias cd..="cd .." | |
alias l="ls -al" | |
alias lp="ls -p" | |
alias h=history |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Module = (function() { | |
var ModuleBase = function(params) { | |
this.params = params || {}; | |
} | |
var submodules = { | |
"module1" : "SubModule" | |
}; | |
for(var key in submodules) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Number.method('integer', function ( ) { | |
return Math[this < 0 ? 'ceil' : 'floor'](this); | |
}); | |
String.method('trim', function ( ) { | |
return this.replace(/^\s+|\s+$/g, ''); | |
}); | |
Function.prototype.method = function (name, func) { | |
this.prototype[name] = func; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var http = require('http'); | |
http.createServer(function (req, res) { | |
res.writeHead(200, {'Content-Type': 'text/plain'}); | |
res.end('Hello World\nApp (r-test) is running..'); | |
}).listen(9974); | |
/* | |
nodester info Gathering information about: vmd | |
nodester info vmd on port 9974 running: true (pid: 15464) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# fetch branch if not in local and not tracked | |
git fetch origin remote_branch_name:local_branch_name | |
# checkout branch locally if branch is tracked after | |
# git status | |
git checkout -b local-name origin/remote-name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// T-Distribution | |
var tDistribution = 2.776; | |
// Run the tests in order | |
runTest("Max Runs, Simple Test", test1, function(){ | |
}); | |
// Run the V8-style Max test (but with error determination) | |
function runTest(name, test, next){ |
OlderNewer