Skip to content

Instantly share code, notes, and snippets.

View kisom's full-sized avatar

Kyle Isom kisom

View GitHub Profile
#!/bin/sh
# script to change the sleep mode of an OS X machine
usage () {
echo "supported sleep modes:"
echo " sleep"
echo " safesleep"
echo " hibernate"
echo " secure"
echo " insecure"
@kisom
kisom / ssh-copy-id.sh
Created May 28, 2012 19:21
copy ssh key to remote host
#!/bin/sh
if [ -z "$1" ]; then
echo "usage: $0 [user@]host [pubkey]"
exit 1;
fi
if [ -z "$2" ]; then
PUBKEY="$(cat ${HOME}/.ssh/id_rsa.pub)"
else
@kisom
kisom / update_links.sh
Created May 26, 2012 21:12
port windows shortcuts to *nix
@kisom
kisom / wordcount.py
Created May 24, 2012 12:35
wordcount
#!/usr/bin/env python
"""
Calculate a number of statistics about a document in English. Includes
the number of words, lexical diversity, and Flesh-Kincaid grade level.
Usage:
wordcount.py <textfile>
"""
@kisom
kisom / buildsys.sh
Created April 10, 2012 09:50
OpenBSD build scripts
#!/bin/ksh
ARCH="$(uname -m)"
KERN="$(uname -v)"
KERN="${KERN%\#*}"
echo '[+] building kernel'
echo
cd /usr/src/sys/arch/$ARCH/conf
config $KERN
@kisom
kisom / hack.sh
Created March 31, 2012 12:03 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@kisom
kisom / gclone.py
Created March 14, 2012 17:24
Expedite cloning github repos.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: Kyle Isom <[email protected]>
# license: ISC / public domain dual-license
"""
Clone github repos.
Usage:
gclone.py [-] [user] repo
@kisom
kisom / tsrv.py
Created February 7, 2012 18:13
Simple server to test sockets.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# author: kyle isom <[email protected]>
# license: ISC / public domain
"""
Simple server to test sockets.
"""
import argparse
import os
@kisom
kisom / sha256-test.clj
Created January 29, 2012 10:47
SHA-256 hashing in Clojure via Java interop
;; test suite to go with hashing code
(ns user.test.sha256
(:use [clojure.test]
[clojure.string :only [join]]
[user.hash]))
(def sha256-test-vectors
#^{:doc "test vectors from the NESSIE project (http://is.gd/jdM99e)"}
[{ :message ""
:expected "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"}
@kisom
kisom / crypto.f95
Created January 22, 2012 19:34
CS260 (Fortran) final project... for teh lulz
! dug up this old thing from an old college class... i had a few good chuckles
!--------------------------------------------------------------------------
! TITLE: CSCI260 Final Project
! AUTHORS:
! * kisom
! * Chris
! * Laura
!
! CLASS: CSCI260A