Skip to content

Instantly share code, notes, and snippets.

View jjcall's full-sized avatar
🎯
Focusing

Jason Calleiro jjcall

🎯
Focusing
View GitHub Profile
var http = require("http");
function onRequest (request, response) {
console.log("Request Recieved");
response.writeHead(200, {"Content-Type": "text/plain"});
response.write("Hello World");
response.end();
}
http.createServer(onRequest).listen(8888);
function execute (someFunction, value) {
someFunction(value);
}
execute(function(word) { consnole.log (word) }, "hello");
function execute (someFunction, value) {
someFunction(value);
}
execute(function(word) { consnole.log (word) }, "hello");
function say(word) {
console.log(word);
}
function execute(someFunction, value) {
someFunction(value);
}
execute(say, "Hello");
@jjcall
jjcall / answer1.js
Created November 8, 2011 15:48
Codeacademy Gist
function increment(start, timesToIncrement) {
var counter = 0;
while( counter !== timesToIncrement) {
start++
}
return start;
}
@jjcall
jjcall / Rakefile
Created September 15, 2011 15:18
Wordpress theme deployment script
ssh_user = "USERNAME"
remote_path = "PATH TO THEME"
namespace :styles do
desc "Clear styles"
task :clear do
puts "*** Clearing styles ***"
system "rm -Rfv styles.css"
end
desc "Generate styles"
@jjcall
jjcall / Rakefile
Created August 13, 2011 02:46 — forked from adamstac/Rakefile
Wordperss deployment with rake and rsync
ssh_user = "[email protected]" # for rsync deployment
remote_root = "~/path/to/remote/" # for rsync deployment
namespace :styles do
desc "Clear styles"
task :clear do
puts "*** Clearing styles ***"
system "rm -Rfv css/*"
end
desc "Generate styles"
# virtualenv aliases
# http://blog.doughellmann.com/2010/01/virtualenvwrapper-tips-and-tricks.html
alias v='workon'
alias v.deactivate='deactivate'
alias v.mk='mkvirtualenv --no-site-packages'
alias v.mk_withsitepackages='mkvirtualenv'
alias v.rm='rmvirtualenv'
alias v.switch='workon'
alias v.add2virtualenv='add2virtualenv'
alias v.cdsitepackages='cdsitepackages'
# usage: rails new APP_NAME -m http://gist.github.com/627198.txt -TJ
# the -T drops test-unit and the -J drops prototype
gem "pg"
gem "omniauth"
gem "paperclip"
gem "haml"
gem "sass"
# Variation on Hashrocket's script for managing the git process
# as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html
# Create shell scripts out of each of these, put them in your path (~/bin for example)
# chmod 755 them and use like this:
#
# This version of hack is totally different than Hackrockets. I feel that hack implies
# that you are getting started, not finishing up. sink is Hashrockets hack.
#
# $ hack branch_name
# Test and Implement until done