I hereby claim:
- I am alecthegeek on github.
- I am alecthegeek (https://keybase.io/alecthegeek) on keybase.
- I have a public key whose fingerprint is BF8A E8CC 9DA3 C1E3 C5BD 0CDD 3FE7 B98F 9BBB FC7C
To claim this, I am signing this object:
#! /usr/bin/env bash | |
if [[ -x /Applications/PaperCut\ MF/server/bin/mac/server-command && | |
-x /Applications/PaperCut\ NG/server/bin/mac/server-command ]] ; then | |
echo copies of both NG and MF installed! | |
exit 1 | |
elif [[ -x /Applications/PaperCut\ MF/server/bin/mac/server-command ]]; then | |
app_root='/Applications/PaperCut MF' | |
elif [[ -x /Applications/PaperCut\ NG/server/bin/mac/server-command ]]; then | |
app_root='/Applications/PaperCut NG' |
#!/bin/sh | |
# https://developer.mozilla.org/en/docs/Rhino/Debugger | |
java -cp $(brew --prefix)/Cellar/rhino/1.7R4/libexec/js.jar org.mozilla.javascript.tools.debugger.Main "$@" |
I hereby claim:
To claim this, I am signing this object:
# Install all the Go tools and godep tool | |
# Location of gobin is based on installation by OS X Homebrew | |
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u golang.org/x/tools/cmd/... | |
sudo -u admin GOPATH=/tmp GOBIN=/usr/local/opt/go/bin go get -u github.com/tools/godep |
#!/bin/bash | |
# manage Tmux | |
if [ -n "$TMUX" ]; then # in tmux | |
if [ -n "$COLORTERM" ]; then # in rich VT | |
export TERM=xterm-256color-italic | |
fi | |
elif tmux list-sessions > /dev/null 2>&1 ; then | |
tmux attach # try to attach |
#! /usr/bin/env sh | |
# Set up some shit dependeing on primary mac address | |
if=en0 # Change this is you don't want to use primary | |
updateHost() { | |
# $1 = ip address | |
# $2 = hostname | |
# $3 = interface name |
#!/bin/sh | |
ssid=$1; shift | |
psk=$1; shift | |
network_id=$(wpa_cli list_networks | tail -n +3 | grep $ssid |cut -f 1) | |
if [ -z $network_id ] ; then | |
maxNetworkId=$(wpa_cli list_networks | tail -n +3 | tail -n 1| cut -f 1)] | |
if [ -z $maxNetworkId ] ; then |
#!/bin/dash | |
ssid=$1 ;shift | |
psk=$1; shift | |
# Is this network already defined? | |
network_id=$(wpa_cli list_networks | tail -n +3 | grep $ssid |cut -f 1) | |
if [ -z $network_id ] ; then | |
maxNetworkId=$(wpa_cli list_networks | tail -n +3 | tail -n 1 | cut -f 1)] |
// Niave implementation of the Ackermann function | |
// https://en.wikipedia.org/wiki/Ackermann_function | |
package main | |
import "fmt" | |
func Ackermann(m, n uint) uint { | |
//fmt.Printf("Called Ackermann(%d,%d) ", m, n) | |
if m == 0 { | |
return n + 1 |