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
def method_name | |
"hello" | |
end |
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
" for vim to interact with tmux | |
Bundle 'benmills/vimux' | |
" for awesome ruby testing | |
Bundle 'jgdavey/vim-turbux' | |
" My settings | |
"use closest pane already open (don't create split if there already is one) | |
let VimuxUseNearestPane = 1 | |
" Create vertical split, no naturally use "h" for vertical :) |
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
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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; | |
} |
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
// 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
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
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
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
#!/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) |
NewerOlder