Skip to content

Instantly share code, notes, and snippets.

View JHawk's full-sized avatar

Joshua Hawkins JHawk

View GitHub Profile
@JHawk
JHawk / sudoku.fs
Created March 27, 2012 18:27
F# sudoku
open System
type Cell = { possible_values: int array; value: int option }
with override this.ToString() = match this.value with Some i -> i.ToString() | _ -> "."
static member PossibleValues = [|1..9|]
type Puzzle = array<array<Cell>>
module internal Setup =
let puzzle =
@JHawk
JHawk / toggle_dock
Created January 15, 2011 15:22
toggle_dock
if ps ax | grep -v grep | grep -i avant-window
then
killall -9 avant-window-navigator
else
avant-window-navigator --start
fi
@JHawk
JHawk / .conkyrc
Created January 15, 2011 14:42
conky config
######################
# - Conky settings - #
######################
update_interval 2
total_run_times 0
net_avg_samples 1
cpu_avg_samples 1
imlib_cache_size 0
double_buffer yes
@JHawk
JHawk / Rakefile to install a gem and copy it to my Documents dir so I can play with it
Created October 12, 2010 18:48
Rakefile to install a gem and copy it to my Documents dir so I can play with it - run as sudo like: sudo rake G=bundler,nokogiri,rails --trace
require 'rubygems'
require 'rake'
require 'fileutils'
desc "installs and copies gems to Documents for src code inspection - just type sudo rake G=gem1,gem2,gem3..."
task :default => :gem_cp
task :gem_cp do
class Doppleganger
def initialize(gems)
@gems = gems