start new:
tmux
start new with session name:
tmux new -s myname
Spine = require('spine') | |
Accounting = require('accounting') | |
class Charge extends Spine.Model | |
@key 'amount', required: true | |
@key 'description' | |
@key 'token' | |
@key 'status' | |
@key 'outgoing', Boolean | |
@key 'created_at', Date |
class Point | |
constructor: (@x = 0, @y = 0) -> | |
if isNaN(@x) or isNaN(@y) | |
throw new Error('Invalid coords') | |
add: (point) -> | |
@x += point.x | |
@y += point.y | |
subtract: (point) -> |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
#!/usr/bin/env bash | |
set -u | |
set -e | |
export GIT_WORK_TREE="/var/www/example.com" | |
export NODE_VERSION="0.10" | |
echo "--> Checking out..." | |
git checkout -f |
# IMPORTANT: this example is potentially out of date. The latest version can be found here: https://github.com/papertrail/remote_syslog2/blob/master/examples/remote_syslog.ebextensions.config | |
# See http://help.papertrailapp.com/kb/hosting-services/aws-elastic-beanstalk/ | |
# Usage: | |
# - replace <VERSION> with the version of remote_syslog2 you want to use. Example: .../download/v0.14/remote_syslog_linux_amd64.tar.gz | |
# - replace <YOUR-TRACKED-FILES> with the files you want to monitor for new log lines. Example: - /var/log/httpd/access_log | |
# - replace <YOUR-APP-NAME> with the name of the application | |
# - replace <YOUR-LOG-DESTINATION> and <YOUR-PORT-NUMBER> with the values shown under log destinations: https://papertrailapp.com/account/destinations | |
sources: |
// List of modules used. | |
var gulp = require('gulp'), | |
bump = require('gulp-bump'), // Generates new version. | |
argv = require('yargs') | |
.default('release', 'patch') | |
.argv, // CLI parser. | |
fs = require('fs'), // Used by bump. | |
semver = require('semver'), // Used by bump. | |
git = require('gulp-git'), // Git wrapper. | |
jshint = require('gulp-jshint'), // Lints JS. |
#!/usr/bin/env bash | |
# If you're using docker-machine, call this script with your | |
# environment name | |
# Ex: ./vpn_fix dev | |
DEFAULTVM="boot2docker-vm" | |
[ $(id -u) = 0 ] || { echo "You must be root (or use 'sudo')" ; exit 1; } | |
report_success () |
<!-- MIT License --> | |
<html> | |
<head> | |
<script> | |
function generateKey(alg, scope) { | |
return new Promise(function(resolve) { | |
var genkey = crypto.subtle.generateKey(alg, true, scope) | |
genkey.then(function (pair) { | |
resolve(pair) | |
}) |
"chuck this in ~/.vim/nerdtree_plugin/coffee_filter.vim (see what I did there?) | |
if exists("g:loaded_nerdtree_js_filter") | |
finish | |
endif | |
let g:loaded_nerdtree_js_filter = 1 | |
let s:extMatch = '\.\(js\|js\.map\)$' | |
call g:NERDTree.AddPathFilter("FilterCoffee") |