As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
========================================== ========================================== | |
TMUX COMMAND WINDOW (TAB) | |
========================================== ========================================== | |
List tmux ls List ^b w | |
New new -s <session> Create ^b c | |
Attach att -t <session> Rename ^b , <name> | |
Rename rename-session -t <old> <new> Last ^b l (lower-L) | |
Kill kill-session -t <session> Close ^b & |
" Use Vim settings, rather then Vi settings (much better!). | |
" This must be first, because it changes other options as a side effect. | |
set nocompatible | |
" ================ General Config ==================== | |
set number "Line numbers are good | |
set backspace=indent,eol,start "Allow backspace in insert mode | |
set history=1000 "Store lots of :cmdline history | |
set showcmd "Show incomplete cmds down the bottom |
(add-hook 'markdown-mode-hook | |
'(lambda () | |
(auto-complete-mode t) | |
(local-unset-key [tab]) | |
(setq-local yas-fallback-behavior '(apply auto-complete)))) |
class Singleton { | |
class var sharedInstance: Singleton { | |
struct Static { | |
static var token: dispatch_once_t = 0 | |
static var instance: Singleton! | |
} | |
dispatch_once(&Static.token) { | |
Static.instance = Singleton() | |
} | |
return Static.instance |
awk ' | |
BEGIN { | |
buffer="" | |
} | |
{ | |
gsub(/<\/*trk>/,"",$0) | |
gsub(/<\/*trkseg>/,"",$0) | |
gsub(/<trkpt/,"<wpt", $0) | |
gsub(/<\/trkpt>/,"<\/wpt>", $0) | |
CloudFlare is an awesome reverse cache proxy and CDN that provides DNS, free HTTPS (TLS) support, best-in-class performance settings (gzip, SDCH, HTTP/2, sane Cache-Control
and E-Tag
headers, etc.), minification, etc.
// color - source color, which is must be replaced | |
// withColor - target color | |
// tolerance - value in range from 0 to 1 | |
func replaceColor(color: UIColor, withColor: UIColor, image: UIImage, tolerance: CGFloat) -> UIImage { | |
// This function expects to get source color(color which is supposed to be replaced) | |
// and target color in RGBA color space, hence we expect to get 4 color components: r, g, b, a | |
assert(color.cgColor.numberOfComponents == 4 && withColor.cgColor.numberOfComponents == 4, | |
"Must be RGBA colorspace") |