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:
I hereby claim:
To claim this, I am signing this object:
| #!/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 |
| GOPATH=/tmp/$$.installgobin GOBIN=$(go env GOROOT)/bin vim -u ~/.vimrc -c ":GoInstallBinaries" -c ":q" /tmp/src/$$.go |
| #!/usr/bin/env sh | |
| # Remove spurious CUPS files created in /tmp | |
| find /private/tmp -maxdepth 1 -type l -name 55\*|sudo xargs rm |
| #!/usr/bin/env bash | |
| # Pause the following Cloud Storage Services | |
| services=('Google Drive' Copy Dropbox) | |
| # Based on ideas and code on https://github.com/tjluoma/dropbox-pause-unpause | |
| if [[ $0 =~ pause || $1 =~ pause ]] ; then | |
| command=STOP |