Skip to content

Instantly share code, notes, and snippets.

View rkachowski's full-sized avatar
👨‍🎤
whats a github status?

Donald Hutchison rkachowski

👨‍🎤
whats a github status?
View GitHub Profile
@rkachowski
rkachowski / game_of_life.rb
Created June 6, 2010 20:45
conway's game of life in gosu/chingu
class GameOfLife < Chingu::GameState
CELL_SIZE = 4
@@tick =0
def initialize
super
@grid = generate_grid
self.input={:left_mouse_button=>:set_grid_block,:space=>:toggle_running,
:right_mouse_button=>:unset_grid_block,:z=>:reset,:n=>:update_grid}
@running = false
@rkachowski
rkachowski / .gitignore
Created April 16, 2012 13:13
RequireJS + CoffeeScript example
*.swp
@rkachowski
rkachowski / download.coffee
Created May 25, 2012 12:40
nodejs downloader
http = require 'http'
fs = require 'fs'
URL = require 'url'
class Downloader
@download_image:(image_url, destination, callback)
options = URL.parse image_url
http.get(options, (response) ->
fileStream = false
@rkachowski
rkachowski / Gemfile
Last active November 12, 2015 16:19
upd - micropingdom
gem "pony"
#!/usr/bin/env ruby
require 'csv'
require 'json'
csv_data = CSV.read ARGV[0]
headings = csv_data[0].compact
result = []
csv_data[1..-1].each do |row|
@rkachowski
rkachowski / .gitconfig
Created April 13, 2016 09:17
the almighty .gitconfig
[alias]
s = status
cma = commit -am
cm = commit -m
cont = rebase --continue
dumbass = commit --amend
forget = update-index --assume-unchanged
unforget = update-index --no-assume-unchanged
root = rev-parse --show-toplevel
lg = "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue)<%an>%Creset' --abbrev-commit"
@rkachowski
rkachowski / 1_1-futurama.png
Last active June 29, 2016 10:14
repro flow
1_1-futurama.png
@rkachowski
rkachowski / maplr.rb
Created January 23, 2017 14:11
create google map links from exif data in jpg files
#!/usr/bin/env ruby
def run
dir = ARGV[0] || Dir.pwd
Dir[File.join(dir,'*.jpg')].each do |file|
gps = gps_for_file file
if gps
puts "#### #{File.basename file} -> http://www.google.com/maps/place/#{gps[0]},-#{gps[1]}"
@rkachowski
rkachowski / payload_enum_win_transfer_software
Last active January 31, 2017 00:29
stupid lfi scripts
for %i in (ruby python ftp debug wscript cscript powershell javac) do where %i
@rkachowski
rkachowski / marathon_photos.js
Created October 3, 2015 12:23
jquery script to grab all the large preview photos from http://marathonfoto.com/
var images = $('img[src$=".jpg"]');
var frame_ids = $.map(images, function(el, index){ return $(el).attr("frameid")});
var urls = $.map(frame_ids, function(el, index){ return "/Ajax/Zoom/?frameid=" + el});
var responses = [];
$.each(urls, function(index, el){ resp = $.get(el, null, function(data){responses.push(data)}) });
function getImagesUrlsFromServerResponses(responses)
{