This file contains hidden or 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
.bundle | |
db/*.sqlite3 | |
log/*.log | |
tmp/ | |
.sass-cache/ | |
config/database.yml | |
*.DS_Store | |
*.swp | |
*.swo |
This file contains hidden or 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
#user nobody; | |
worker_processes 2; | |
#pid logs/nginx.pid; | |
#error_log logs/error.log; | |
#error_log logs/error.log notice; | |
#error_log logs/error.log info; | |
events { | |
worker_connections 1024; |
This file contains hidden or 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
#!/usr/bin/env ruby | |
USAGE = %{ | |
Usage: | |
Put this script somewhere in your path, I use ~/bin | |
chmod +x to make it executable. | |
nginx start (starts nginx) | |
nginx stop (stops nginx) | |
nginx restart (calls stop and then start) |
This file contains hidden or 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
#!/usr/bin/env ruby | |
USAGE = %{ | |
Usage: | |
Put this script somewhere in your path, I use ~/bin | |
chmod +x to make it executable | |
mongod start (starts mongod) | |
mongod stop (stops mongod) | |
mongod stat (calls ps aux|grep ... to see if mongod is running) |
This file contains hidden or 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 countdown = (function(){ | |
var index; | |
function log(){ | |
console.log(index); | |
} | |
function iterate(){ | |
log(); |
This file contains hidden or 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 CARS = [ | |
{ color: 'blue', make: 'BMW' }, | |
{ color: 'red', make: 'Ferrari' } | |
]; | |
var logCar = function(car){ | |
console.log("I'm a " + car['color'] + ' ' + car['make']) | |
} | |
function Car(make, color){ |
This file contains hidden or 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
Function.prototype.cached = function(){ | |
var that = this; | |
var cache = {}; | |
return function(arg){ | |
if(arg in cache){ | |
return cache[arg]; | |
}else{ | |
cache[arg] = that(arg); | |
return cache[arg]; | |
} |
This file contains hidden or 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
// 1. Write a class to support the following code: | |
var Person = function(name){ | |
this.name = name; | |
}; | |
Person.prototype.getName = function(){ | |
return this.name; | |
}; | |
var thomas = new Person('Thomas'); |
This file contains hidden or 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 | |
### BEGIN INIT INFO | |
# Provides: nginx | |
# Required-Start: $all | |
# Required-Stop: $all | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: starts the nginx web server | |
# Description: starts nginx using start-stop-daemon |
This file contains hidden or 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
.mad-libs-content { | |
position: relative; | |
} | |
.animate-questions, .animate-results { | |
position: absolute; | |
top: 0; | |
left: 0; | |
right: 0; | |
} |
OlderNewer