Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash -e
# Setup a Root CA in vault
# Generate and sign an Intermediate cert
#
# Requires:
# * A running vault server already initialzed and unsealed
# * Environment variable VAULT_TOKEN is set
# * vault cli (https://www.vaultproject.io)
# * httpie (https://github.com/jkbrzt/httpie)
@smgoller
smgoller / install-xcode
Created March 13, 2016 02:21
Demonstrate a wholly automated Xcode install.
#!/bin/bash
set -e
# Standalone script to install Xcode w/ CLI tools on a fresh OS X 10.8, via applescript.
# This might be more lovely (and maintainable) as ruby, if only we could have some handy
# gems that all need a compiler for native extensions. We don't, so do it old school.
# Some things:
@smgoller
smgoller / nowplaying-chrome.applescript
Created September 30, 2015 17:32 — forked from sikachu/nowplaying-chrome.applescript
Post current song playing in Google Play Music in Chrome to Colloquy
using terms from application "Colloquy"
on process user command c with arguments for view
try
if c is in {"nowplaying", "np", "playing"} then
tell application "Google Chrome"
repeat with w in (every window)
repeat with t in (every tab whose URL contains "play.google.com/music") of w
if (execute t javascript "document.getElementsByClassName('playing').length") is equal to 1 then
set tTitle to execute t javascript "document.getElementById('playerSongTitle').innerText;"
set tArtist to execute t javascript "document.getElementById('player-artist').innerText;"

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@smgoller
smgoller / gist:1171102
Created August 25, 2011 16:36 — forked from mhinze/gist:123732
git svn workflow
# adapted from http://notes.jimlindley.com/2008/3/25/git-svn-that-works-for-me
# initial setup
git svn clone <svn_repo>
# begin the workflow
git svn fetch -r HEAD --ignore-paths="Package.zip" # aliased to 'git up', my Package.zip is very large.
git svn rebase -l # we just updated, no need to go back to the svn repo
# 99% of daily workflow