date
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
show2d [x] = show x | |
show2d (x:xs) = show x ++ "\n" ++ show2d xs | |
multiples :: Integer -> [[Integer]] | |
multiples x = filter ((1 /=).(length)) $ | |
map (\y->filter ((0 ==).(`mod` y)) [1 .. x]) [1..x] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Snarf a file or the output of a command into the | |
# X11 paste buffer using xclip(1). | |
if [ -z $1 ]; then | |
name=`basename $0` | |
echo "Usage: $name [command] <arg1> ... <argN>, or" | |
echo " $name [file]" | |
exit 1 | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sudowoodo() { | |
read -p "Are you sure? " -n 1 -r | |
echo | |
if [[ $REPLY =~ ^[Yy]$ ]] | |
then | |
sudo mkfs.ext4 /dev/sda | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define fizzbuzz | |
; this is a default-args wrapper | |
(lambda () | |
(fizzbuzz-iter 1))) | |
(define fizzbuzz-iter | |
(lambda (iter) | |
; the actual meat of fizzbuzz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function evil() { | |
if [ $SSH_CLIENT ]; | |
then if [[ $1 == /* ]]; | |
then ssh ian@$(echo $SSH_CLIENT | awk '{print $1}') -C emacsclient /ubuntu@isw-dev:$1; | |
else ssh ian@$(echo $SSH_CLIENT | awk '{print $1}') -C emacsclient /ubuntu@isw-dev:$(pwd)/$1; | |
fi | |
else vim; | |
fi | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am gigawhitlocks on github. | |
* I am ianwhitlock (https://keybase.io/ianwhitlock) on keybase. | |
* I have a public key whose fingerprint is E429 3E94 559A 251A 1C45 AE18 C47C DD6C 4019 B337 | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun gif-emacs (duration) | |
(interactive "sDuration: ") | |
(start-process "emacs-to-gif" nil | |
"byzanz-record" | |
"-d" duration | |
"-w" (number-to-string (+ 5 (frame-pixel-width))) | |
"-h" (number-to-string (+ 50 (frame-pixel-height))) | |
"-x" (number-to-string (frame-parameter nil 'left)) | |
"-y" (number-to-string (+ (frame-parameter nil 'top) 10)) | |
(concat "~/emacs_gifs/" (format-time-string "%Y-%m-%dT%T") ".gif"))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyvcloud.vcloudair import VCA | |
from pprint import pprint | |
import os | |
import time | |
import uuid | |
class ESXInstance(object): | |
def __init__(self, password=os.getenv("vca_password"), | |
username=os.getenv("vca_username"), |
I hereby claim:
- I am gigawhitlocks on github.
- I am ianwhitlock (https://keybase.io/ianwhitlock) on keybase.
- I have a public key whose fingerprint is 17C0 6195 3CBA 8E76 F9C9 9BB5 8941 9A7A 5E79 2775
To claim this, I am signing this object:
OlderNewer