Skip to content

Instantly share code, notes, and snippets.

@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
@smgoller
smgoller / fixes.patch
Created September 29, 2012 06:46
homebrew unac formula iconv patch
diff --git a/configure.ac b/configure.ac
index 4a4eab6..9f25d50 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,7 @@ AM_MAINTAINER_MODE
AM_ICONV
+LIBS="$LIBS -liconv"
AC_CHECK_FUNCS(iconv_open,,AC_MSG_ERROR([
@smgoller
smgoller / gist:3805604
Created September 30, 2012 01:40
unac formula that currently works
require 'formula'
class Unac < Formula
homepage ''
url 'http://ftp.de.debian.org/debian/pool/main/u/unac/unac_1.8.0.orig.tar.gz'
sha1 '3e779bb7f3b505880ac4f43b48ee2f935ef8aa36'
depends_on 'gettext' => :build
depends_on 'autoconf' => :build
depends_on 'automake' => :build
javascript:void(function(){var i,a,s;$.ajax({url: '/', async: false});a=document.getElementsByTagName('link');for(i=0;i<a.length;i++){s=a[i];if(s.rel.toLowerCase().indexOf('stylesheet')>=0&&s.href) {var h=s.href.replace(/(&|%5C?)forceReload=d+/,'');s.href=h+(h.indexOf('?')>=0?'&':'?')+'forceReload='+(new Date().valueOf())}}})();

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Keybase proof

I hereby claim:

  • I am smgoller on github.
  • I am smgoller (https://keybase.io/smgoller) on keybase.
  • I have a public key ASBoe1nu2JMs8ApBC86mQbXib8RJMDP3geh2Y0hi1MLvZAo

To claim this, I am signing this object:

@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;"
#This regex looks for $ followed by anything other than { (wrapped variable) and ( (execute command in subshell)
\$(?!\{|\()
@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 / alfalfa-bootstrap.sh
Last active April 27, 2017 19:44
alfalfa bootstrap
#!/usr/bin/env bash
[[ -d /usr/local/Homebrew ]] || /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
hash foo 2>/dev/null || brew install ansible lastpass-cli
echo "Enter your lastpass username:"
read username
lpass login ${username}
mkdir -p ~/.ssh
lpass show --notes 7467094604006037409 > ~/.ssh/id_rsa_toolsmiths
lpass show --field="Public Key" 7467094604006037409 > ~/.ssh/id_rsa_toolsmiths.pub
chmod 700 ~/.ssh