Skip to content

Instantly share code, notes, and snippets.

View david-thorman's full-sized avatar

David Thorman david-thorman

  • Kloudless Inc.
  • Oakland, CA
View GitHub Profile
@david-thorman
david-thorman / ke_config_skel.sh
Last active November 23, 2020 18:14
Kloudless Enterprise configuration file skeleton generator
#!/bin/bash
set -eu -o pipefail
gen_priv() {
openssl genrsa 2048 2> /dev/null
}
gen_pub() {
echo "${1}" | openssl rsa -pubout 2> /dev/null
}
@david-thorman
david-thorman / syntastic.vim
Created March 4, 2017 03:44
dthorman's syntastic vim thing
" Syntastic stuff
set statusline=%<%f\ %y%#warningmsg#%{SyntasticStatuslineFlag()}%*%h%m%r%=%-14.(%l,%c%V%)\ %P
let g:syntastic_always_populate_loc_list = 1
let g:syntastic_autoloc_list = 1
let g:syntastic_check_on_open = 1
let g:syntastic_check_on_wq = 0
" Don't check unless requested
let g:syntastic_mode_map = {'mode': 'passive'}
map <F11> :SyntasticCheck^M
@david-thorman
david-thorman / gen_passphrase.sh
Created March 3, 2016 17:03
Generate random passphrase on OSX with bash
#!/bin/bash
# Only tested on OSX
DICT="/usr/share/dict/words"
CEIL=$(wc -l "$DICT" | tr -s '[:blank:]' ' ' | cut -d' ' -f2)
if [ "$#" -lt 1 ] ; then
LEN="5"
else
LEN="$1"
fi
@david-thorman
david-thorman / tmux.conf
Last active May 19, 2017 07:40
Wooo tmux
set -g prefix C-a
unbind C-b
bind a send-prefix
# Setting vi style stuff
set -g status-keys vi
set -g history-limit 10000
setw -g monitor-activity on
unbind ,
bind-key A command-prompt -I "#W" "rename-window '%%'"
bind-key C command-prompt "new-window '%%'"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>LOLOL Encoder/Decoder</title>
<script type="text/javascript">
//<![CDATA[
function lolol2txt(lolol)
{