Skip to content

Instantly share code, notes, and snippets.

@iangreenleaf
iangreenleaf / rsync-retry.sh
Created January 18, 2010 07:12
rsync with retries
#!/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
@Htbaa
Htbaa / .perltidyrc
Created July 21, 2010 12:13
.perltidyrc
# 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
@Htbaa
Htbaa / .gvimrc
Last active February 16, 2024 10:23
.gvimrc
" 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
@Htbaa
Htbaa / .gitconfig
Created April 27, 2011 10:31
.gitconfig
[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"
@Htbaa
Htbaa / .gitignore
Created September 3, 2011 20:05
BlitzMax Indexer
*.xml
.*
!.gitignore
Makefile*
!Makefile.PL
META.yml
MYMETA.*
blib
build
/inc
@erikh
erikh / hack.sh
Created March 31, 2012 07:02 — forked from DAddYE/hack.sh
OSX For Hackers
#!/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
#
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 24, 2024 17:56
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@ikbear
ikbear / sortmap.go
Created November 8, 2012 12:59
Sort Map(golang)
package main
// sort a map's keys in descending order of its values.
import "sort"
type sortedMap struct {
m map[string]int
s []string
}
@alexjs
alexjs / cors-nginx.conf
Created November 28, 2012 22:42 — forked from michiel/cors-nginx.conf
Slightly tighter CORS config for nginx
#
# 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.
#