Skip to content

Instantly share code, notes, and snippets.

View swhitt's full-sized avatar
:shipit:
squirrel

Steve Whittaker swhitt

:shipit:
squirrel
View GitHub Profile
<h1>Steve Whittaker's GitHub page.</h1>
@swhitt
swhitt / morse.rb
Created June 10, 2010 16:24 — forked from ryanb/morse.rb
def morse s;26.times{|i|s.gsub!(/#{(97+i).chr}/i,"$be5 J8G#T6P'&9Sl/,!-H0cfk".split('').map{|x|(x[0]-31).to_s(3).gsub('2','-').gsub('1','.')}[i])};s;end
swhitt@bender:~/Code/personal$ ruby supermagical.rb
..........(1, 1, 2), (3, 5, 6), (5, 13, 14), (7, 7, 10), (7, 25, 26), (9, 41, 42), (11, 19, 22), (11, 61, 62), (13, 27, 30), (13, 85, 86), (15, 113, 114), (17, 47, 50), (17, 145, 146), (19, 59, 62), (19, 181, 182), (21, 221, 222), (23, 25, 34), (23, 87, 90), (23, 265, 266), (25, 103, 106), (25, 313, 314), (27, 365, 366), (29, 139, 142), (29, 421, 422), (31, 49, 58), (31, 159, 162), (31, 481, 482), (33, 545, 546), (35, 203, 206), (35, 613, 614), (37, 227, 230), (37, 685, 686), (39, 761, 762), (41, 41, 58), (41, 71, 82), (41, 89, 98), (41, 279, 282), (41, 841, 842), (43, 307, 310), (43, 925, 926), (47, 95, 106), (47, 367, 370), (49, 129, 138), (49, 399, 402), (51, 59, 78), (53, 467, 470), (55, 503, 506), (59, 189, 198), (59, 579, 582), (61, 101, 118), (61, 619, 622), (63, 95, 114), (63, 175, 186), (65, 703, 706), (67, 245, 254), (67, 747, 750), (69, 211, 222), (71, 839, 842), (73, 887, 890), (75, 157, 174), (77, 325, 334), (77, 987, 990), (85, 93, 126), (85,
#!/usr/bin/env bash
# This is an RVM Project .rvmrc file, used to automatically load the ruby
# development environment upon cd'ing into the directory
# First we specify our desired <ruby>[@<gemset>], the @gemset name is optional,
# Only full ruby name is supported here, for short names use:
# echo "rvm use 1.9.2" > .rvmrc
#
# NOTE: USE_32BIT_FOR_ORACLE environment variable is custom so that someone on OS X Lion can
swhitt@calculon:~$ dig williampaid.com
; <<>> DiG 9.8.3-P1 <<>> williampaid.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 47864
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;williampaid.com. IN A
@swhitt
swhitt / cgminer.conf
Last active December 14, 2015 22:28
Here's my cgminer 7970 config for scrypt / litecoins. This gets me approx 750 Khash/sec if you push the memclock to 1800 and the engine clock to 1080. This current OC config might be too high for you or you might want to push it more. On my reference 7970s the engine clock / mem clock ratio peaks at 0.6.
{
"intensity" : "13",
"vectors" : "1",
"worksize" : "256",
"kernel" : "scrypt",
"lookup-gap" : "0",
"thread-concurrency" : "8192",
"shaders" : "0",
"gpu-engine" : "1020",
"gpu-fan" : "85",
@swhitt
swhitt / backbone-validation-bootstrap.js.coffee
Last active December 25, 2015 16:39 — forked from driehle/backbone-validation-bootstrap.js.coffee
Render error messages of Backbone.Validation for Twitter Bootstrap 3
_.extend Backbone.Validation.callbacks,
valid: (view, attr, selector) ->
control = view.$('[' + selector + '="' + attr + '"]')
group = control.parents('.form-group')
group.removeClass('has-error')
if control.data('error-style') == 'tooltip'
# CAUTION: calling tooltip('hide') on an uninitialized tooltip
# causes bootstraps tooltips to crash somehow...
control.tooltip 'hide' if control.data('tooltip')
@swhitt
swhitt / cgminer-scrypt.json
Created December 11, 2013 20:17
cgminer config for litecoins on my 7970
{
"pools" : [
{
"url" : "http://ltc.give-me-coins.com:3333",
"user" : "xx",
"pass" : "xx"
}
]
,
"intensity" : "13",
@swhitt
swhitt / keybase.md
Created December 4, 2014 23:16
keybase.io verification

Keybase proof

I hereby claim:

  • I am swhitt on github.
  • I am swhitt (https://keybase.io/swhitt) on keybase.
  • I have a public key whose fingerprint is FA30 6CF7 4117 BDF2 DD4B D801 A431 CC06 F172 5400

To claim this, I am signing this object:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDNlyIHg7FyWw3SBISbSVGXPrFyxaGhCTp1obN7nGtmkY4c4eF6ZE8Qo298E2smE65z6zne05z2HGqyBtWLHDwCIv2wE9VuLVziLTMgzP0NiqvqHe5YTrdnpxq7BLjGGiGVU+4ehWu6t1eYfZDgvkjhPHqLSOV3axoE4qyAcS0wirQ+t5IRveDUsd3i0oi7/F7HOgkST6ckIp51XzY+NJJfrKwBsCHNViYhqo7bW7pcelpBf43y/3aKXPAKMAMIXeVLM0yjdZPtONL+fCB5dUKb6UVOPuXFsYaVeWqxbxkaaoIU/2h6GWrZHZEd0K7MAI+Hiy9aAlkMhPe0okHVnTn/BrbIp2XAu0wq1UC6Wua1jzzFK61/x8XjfhPXPmrT08x74v2iZ0u1PTiL0qp74JhyP4ErfjZsQSK7seSyqqga1z7C+pwDtvd8EVDpia0tqxcXuOi0Okm3RVjh20JMDf1MVRhczMo+FUV0GnijVMHb8eeicSwi60nRARG4lWxWk8QmDZ2NHSHv9EKSp1c9zBn7q7J44mWREe8vTpjGkWpbV1LKvp8NGfrRoJ2o56Egrcz/LiOhUSbcgFRstlRw8Hh+EvdQSiBEEWoWQV3NZjD9z3bsoJ6vqm4uXydiYlOGoPWyePAbLMX/5/jG/joZhQET6m9jUqM2uspFmdH6hm/7/w== openpgp:0x60819EBC