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 / toasty_mofo.s
Created February 29, 2016 21:56
a gb rom to show an image
; Hello Sprite No Interrupts1.0
; February 19, 2007
; John Harrison
; using sprites without interrupts
; Look at this sprite example first, then look at the example with interrupts
; An extension of Hello World, based mostly from GALP
INCLUDE "gbhw.inc" ; standard hardware definitions from devrs.com
INCLUDE "ibmpc1.inc" ; ASCII character set from devrs.com
@rkachowski
rkachowski / Gemfile
Last active November 12, 2015 16:19
upd - micropingdom
gem "pony"
@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)
{
@rkachowski
rkachowski / Cheatsheet.md
Last active June 11, 2019 14:53
things i keep forgetting

ruby

Get match data for each regex occurance in string

  • "string to check".to_enum(:scan, /\s/).map { Regexp.last_match }

bash

generate hex chars

  • for i in $(seq 1 255); do echo -n $(printf '\\x%02x' $i); done
@rkachowski
rkachowski / Makefile
Created August 27, 2015 09:04
java/android makefile
JAR_PKG = JarName.jar
CP = cp
#change this to fit the version of installed android sdk on build system
API_LEVEL=22
#unity expects jdk 1.6
JFLAGS = -cp ${jar_file} -g -source 1.6 -target 1.6
JC = javac
JAR = jar
@rkachowski
rkachowski / download.rb
Last active September 2, 2015 13:12
mass downloadin
require 'oga'
require 'open-uri'
require 'uri'
require 'rest-client'
require 'pry'
require 'thread'
$log_lock = Mutex.new
def get_urls
page_url = ARGV[0]
This file has been truncated, but you can view the full file.
renderer:transform:] + 4679
5 SpriteBuilder 0x0000000105f16791 -[CCSprite(NoARC) draw:transform:] + 401
6 SpriteBuilder 0x0000000105f165c5 -[CCNode(NoARC) visit:parentTransform:] + 853
7 SpriteBuilder 0x0000000105d42849 -[CCNode(NodeInfo) customVisit:parentTransform:] + 249
8 SpriteBuilder 0x0000000105f16507 -[CCNode(NoARC) visit:parentTransform:] + 663
9 SpriteBuilder 0x0000000105d42849 -[CCNode(NodeInfo) customVisit:parentTransform:] + 249
10 SpriteBuilder 0x0000000105f16507 -[CCNode(NoARC) visit:parentTransform:] + 663
11 SpriteBuilder 0x0000000105d42849 -[CCNode(NodeInfo) customVisit:parentTransform:] + 249
12 SpriteBuilder 0x0000000105f16507 -[CCNode(NoARC) visit:parentTransform:] + 663
13 SpriteBuilder 0x0000000105d42849 -[CCNode(NodeInfo) customVisit:parentTransform:] + 249
@rkachowski
rkachowski / Rakefile
Last active August 29, 2015 14:07
Rudimentary C Rakefile
rule ".o" => ".c" do |t|
execute "cc -c #{t.source} -o #{t.name}"
end
rule /^((?!\w*\.\w*).)*$/ => ".c" do |t|
deps = t.prerequisites
objects = deps.select { |d| d.pathmap == ".o" }
execute "cc #{t.source} #{objects.join ' '} -o #{t.name}"
end

Keybase proof

I hereby claim:

  • I am rkachowski on github.
  • I am rkachowski (https://keybase.io/rkachowski) on keybase.
  • I have a public key whose fingerprint is 74A1 D07F 4F6E F13C DD16 3757 5758 E143 DEEC 91B1

To claim this, I am signing this object:

@rkachowski
rkachowski / gist:10985907
Created April 17, 2014 14:03
level 13 untrusted
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/