start new:
tmux
start new with session name:
tmux new -s myname
#!/usr/bin/env node | |
var argv = require('optimist') | |
.usage('Usage: --key=[consumer key] -secret=[consumer secret]') | |
.demand(['key', 'secret']) | |
.argv | |
; | |
var OAuth = require('oauth').OAuth; | |
var Step = require('step'); |
############################################################################ | |
# _ | |
# | |_ _ __ ___ _ ___ __ | |
# | __| '_ ` _ \| | | \ \/ / | |
# | |_| | | | | | |_| |> < | |
# \__|_| |_| |_|\__,_/_/\_\ | |
# | |
# Cheatsheets: | |
# https://devhints.io/tmux | |
# `property not found` issue: |
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
/** | |
* HandleBars remote template loader | |
* | |
* Allows for direct insertion into dom if jQuery selector string is passed (el). | |
* Returns $.ajax promise regardless so code can attach callbacks externally. | |
* | |
* @example | |
* // Direct insertion into dom | |
* Handlebars.renderFromRemote('/media/templates/hello.handlebars', { name: 'Ryan' }, '#content'); | |
* |
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |
// HELPER: #key_value | |
// | |
// Usage: {{#key_value obj}} Key: {{key}} // Value: {{value}} {{/key_value}} | |
// | |
// Iterate over an object, setting 'key' and 'value' for each property in | |
// the object. | |
Handlebars.registerHelper("key_value", function(obj, fn) { | |
var buffer = "", | |
key; |
#! /usr/bin/env ruby | |
require 'yaml' | |
environment = YAML.load_file('../environment.yml') | |
database = YAML.load_file('config/database.yml') | |
prod_db = database['production'] | |
prod_db['username'] = environment['DOTCLOUD_DB_SQL_LOGIN'] | |
prod_db['password'] = environment['DOTCLOUD_DB_SQL_PASSWORD'] | |
prod_db['host'] = environment['DOTCLOUD_DB_SQL_HOST'] | |
prod_db['port'] = Integer(environment['DOTCLOUD_DB_SQL_PORT']) |
From https://gist.github.com/3050224
From http://blog.smartcore.net.au/smartos-the-basics/