Skip to content

Instantly share code, notes, and snippets.

View remove-gpg-user.sh
#!/bin/bash
#
# Script to remove GPG key from git-crypt
#
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
#
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.
@dwlf
dwlf / .gitignore
Last active Aug 29, 2015
es-on-lx-ubuntu
View .gitignore
elastic-install-triton-ubuntu.bash
@dwlf
dwlf / base-64 15.1.1 gcc49-4.9.2nb1
Created Jun 16, 2015
gcc, g++ exe not in gcc49 on smartos?
View base-64 15.1.1 gcc49-4.9.2nb1
__ . .
_| |_ | .-. . . .-. :--. |-
|_ _| ;| || |(.-' | | |
|__| `--' `-' `;-| `-' ' ' `-'
/ ; Instance (base-64 15.1.1)
`-' https://docs.joyent.com/images/smartos/base
[root@cb2299e2-5f28-ea84-8aac-8e45c0ee6b40 ~]# pkgin up
reading local summary...
processing local summary...
View bootstrap_homeshick.sh
#!/bin/bash -ex
# Paste this into ssh
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex
# When forking, you can get the URL from the raw (<>) button.
### Set some command variables depending on whether we are root or not ###
# This assumes you use a debian derivate, replace with yum, pacman etc.
aptget='sudo apt-get'
chsh='sudo chsh'
View manatee_brain_transplant.md

Manatee Brain Transplant

The goal of this process is to upgrade a manatee of any vintage to Manatee v2. It relies on ZFS send/recv to replicate the data, but is limited to a migration between nodes in ONWM.

step 1. upgrade moray

Upgrading moray to a forward/backward compatible version is a prerequisite of the upgrade. The usual process is to disable one moray node, double-check the stack reconnects correctly, reprovision that node, and then repeat for other moray nodes.

If there is only one moray node deployed, deploying a second using the new image allows you to upgrade the original node as above.

View gist:5cc49974335311ca7bf2
require 'rubygems'
require 'rack'
def application(env)
[200, {"Content-Type" => "text/html"}, ["Hello Rack!"]]
end
run method(:application)
View gist:11cddc2fe6001d94083d
#!/usr/bin/python
## gitsh (pronounced like "glitch"), an interactive wrapper for git.
##
## gitsh parses the output of "git status" and numbers the files for
## you, for easy operations on multiple files.
##
## $ gitsh status
## 1) M foo/bar.py
## 2) M foo/baz.py
## 3) A blah.sh
View sshGetMD5Fingerprint.sh
#!/bin/bash
if [[ -n "$TRACE" ]]; then
export PS4='[\D{%FT%TZ}] ${BASH_SOURCE}:${LINENO}: ${FUNCNAME[0]:+${FUNCNAME[0]}(): }'
set -o xtrace
fi
set -o errexit
set -o pipefail
View keybase.md

Keybase proof

I hereby claim:

  • I am lloydde on github.
  • I am lloydde (https://keybase.io/lloydde) on keybase.
  • I have a public key whose fingerprint is B3B2 605B 45A3 4DD2 833D 1A8F 50E9 E9D0 325B C5AC

To claim this, I am signing this object:

View gist:c12b939d717998ecefa2
call plug#begin()
Plug 'tpope/vim-sensible'
" ---- asthetic ----
Plug 'altercation/vim-colors-solarized'
Plug 'tomasr/molokai'
Plug 'bling/vim-airline'
" ---- navigation ----
Plug 'scrooloose/nerdtree'