start new:
tmux
start new with session name:
tmux new -s myname
function lens(get, set) { | |
var f = function (a) { return get(a); }; | |
f.set = set; | |
f.mod = function (f, a) { return set(a, f(get(a))); }; | |
return f; | |
} | |
var first = lens( | |
function (a) { return a[0]; }, | |
function (a, b) { return [b].concat(a.slice(1)); } |
set-window-option -g utf8 on | |
set -g mode-mouse on | |
set -g mouse-resize-pane on | |
set -g mouse-select-pane on | |
set -g mouse-select-window on | |
set-option -g prefix C-q | |
set -g history-limit 50000 | |
unbind-key C-b | |
bind-key q send-prefix | |
set -g base-index 1 |
# add this to your .zshrc and then add | |
# $(__prompt_color) to your PROMPT | |
function __prompt_color() | |
{ | |
local RGB CONVERTED RH GH BH RD GD BD | |
RGB=$(echo $(pwd) | md5 | cut -c 1-6) | |
RH=$(echo ${RGB} | cut -c 1-2) | |
GH=$(echo ${RGB} | cut -c 3-4) |
I use tmux splits (panes). Inside one of these panes there's a Vim process, and it has its own splits (windows).
In Vim I have key bindings C-h/j/k/l
set to switch windows in the given direction. (Vim default mappings for windows switching are the same, but prefixed with C-W
.) I'd like to use the same keystrokes for switching tmux panes.
An extra goal that I've solved with a dirty hack is to toggle between last active panes with C-\
.
Here's how it should work:
mostly in the realm of creative coding and graphics programming
lots of these are my own :)
https://www.npmjs.org/package/wzrd (browserify dev server)
https://www.npmjs.org/package/budo (like wzrd but with incremental watching & LiveReload)
https://www.npmjs.org/package/beefy (more fully-featured dev server)
Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.
Grab a copy of Terraform for your platform from http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH
and testing that it works.
box: wercker/nodejs | |
# Build definition | |
build: | |
# The steps that will be executed on build | |
steps: | |
- script: | |
name: Reduce NPM cache time | |
code: npm config set cache-lock-stale 10000 |
// stepper.js | |
// 2015 cloudbender | |
// iojs 1.0.2 | |
// generator works and steps itself, | |
// from the event loop; | |
process.on( 'exit', function(){console.log('bye');} ); | |
(function main(){ |
#!/bin/sh | |
# Command-line world clock | |
# Taken from http://stackoverflow.com/questions/370075/command-line-world-clock | |
# .worldclock.zones file looks like: | |
# US/Pacific | |
# Europe/Berlin | |
# Chile/Continental | |
: ${WORLDCLOCK_ZONES:=$HOME/.worldclock.zones} |