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
username: vagrant | |
password: vagrant | |
sudo apt-get update | |
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev | |
sudo aptitude install mysql-server mysql-client | |
sudo nano /etc/mysql/my.cnf |
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
.parent { | |
background-color: #ddd; | |
text-align: justify; | |
width: 500px; | |
} | |
.child { | |
margin: 1px; | |
display: inline-block; | |
width: 100px; |
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
# Remap prefix to Control + a (screen default) | |
set -g prefix C-a | |
unbind C-b | |
bind C-a send-prefix | |
# Force a reload of config file | |
unbind r | |
bind r source-file ~/.tmux.conf | |
# Make tmux use 256 colors |
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 fs = require('fs') | |
var tls = require('tls') | |
var options = { | |
cert: fs.readFileSync('cert.pem'), | |
passphrase: 'passphrase' | |
} | |
var stream = tls.connect(700, 'hostname.com', options); | |
stream.setEncoding('utf8') |
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 express = require('express') | |
var app = module.exports = express.createServer() | |
app.listen(8000) | |
console.log("Started listening on port 8000") |
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
increaseIndexAbove model.index, (err) -> | |
if err | |
res.send 500 | |
throw err | |
else | |
insertNewModel model, (err) -> | |
if err | |
res.send 500 | |
throw err | |
else |
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 Test() { | |
// Not much | |
} | |
Test.prototype.say = function(msg) { | |
setTimeout(function() { | |
console.log(msg); | |
}, 2000); | |
}; |
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
stylus = require 'stylus' | |
path = require 'path' | |
express = require 'express' | |
app = express.createServer() | |
public_dir = path.join __dirname, 'public' | |
styles_dir = path.join public_dir, 'styles' | |
# Setup stylus compiler | |
compile = (str, path) -> |
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
add_action('wpmu_new_blog', 'create_new_site'); | |
function create_new_site($blog_id) { | |
switch_to_blog($blogid); | |
// Do all the work | |
switch_theme('marlun', 'marlun'); | |
restore_current_blog(); | |
} |
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
# In general, there are many places in the file where you can leave off the parens in function calls, if you like. | |
unless typeof exports is "undefined" # `unless ... else` reads poorly in English. Better to stick to `if ... else`. | |
Spine = exports | |
else | |
Spine = @Spine = {} | |
Spine.version = "0.0.4" | |
$ = Spine.$ = @jQuery || @Zepto || -> arguments[0] # In Coffee, `or` is preferred over `||`. |