start new:
tmux
start new with session name:
tmux new -s myname
#!/bin/bash | |
### ABOUT | |
### Runs rsync, retrying on errors up to a maximum number of tries. | |
### Simply edit the rsync line in the script to whatever parameters you need. | |
# Trap interrupts and exit instead of continuing the loop | |
trap "echo Exited!; exit;" SIGINT SIGTERM | |
MAX_RETRIES=50 |
# Perl Best Practices (plus errata) .perltidyrc file | |
-l=98 # Max line width is 98 cols | |
-i=4 # Indent level is 4 cols | |
-ci=4 # Continuation indent is 4 cols | |
#-st # Output to STDOUT | |
-se # Errors to STDERR | |
-vt=2 # Maximal vertical tightness | |
-cti=0 # No extra indentation for closing brackets | |
-pt=1 # Medium parenthesis tightness | |
-bt=1 # Medium brace tightness |
" NOTE: a separate .vimrc is required for vim-plug: https://gist.github.com/Htbaa/b3c8d46db8936ad69c4c9bf46e55b51b | |
" Many thanks to https://raw.github.com/nvie/vimrc/master/vimrc | |
" http://nvie.com/posts/how-i-boosted-my-vim/ | |
"set guifont="Droid Sans Mono:h10:b:cANSI" | |
"set guifont=Consolas:h10:b:cANSI | |
set number " always show line numbers | |
set smartindent | |
set hlsearch " highlight search terms |
[mergetool "kdiff3"] | |
path = C:/Program Files (x86)/KDiff3/KDiff3.exe | |
[merge] | |
tool = kdiff3 | |
[core] | |
autocrlf = true | |
# safecrlf = true | |
trustctime = false | |
editor = vi | |
[diff] |
set background=dark | |
hi clear | |
if exists("syntax_on") | |
syntax reset | |
endif | |
let colors_name = "kraihlight" |
*.xml | |
.* | |
!.gitignore | |
Makefile* | |
!Makefile.PL | |
META.yml | |
MYMETA.* | |
blib | |
build | |
/inc |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
package main | |
// sort a map's keys in descending order of its values. | |
import "sort" | |
type sortedMap struct { | |
m map[string]int | |
s []string | |
} |
# | |
# Slightly tighter CORS config for nginx | |
# | |
# A modification of https://gist.github.com/1064640/ to include a white-list of URLs | |
# | |
# Despite the W3C guidance suggesting that a list of origins can be passed as part of | |
# Access-Control-Allow-Origin headers, several browsers (well, at least Firefox) | |
# don't seem to play nicely with this. | |
# |