Skip to content

Instantly share code, notes, and snippets.

View donaldguy's full-sized avatar

Donald Guy donaldguy

View GitHub Profile

Keybase proof

I hereby claim:

  • I am donaldguy on github.
  • I am donaldguy (https://keybase.io/donaldguy) on keybase.
  • I have a public key whose fingerprint is 10EA BF8E 35E2 9F8D 69C6 DA36 6C99 1C70 C73A 15BC

To claim this, I am signing this object:

@donaldguy
donaldguy / calc.asm
Created March 22, 2014 22:59
The single calculation infix calculator I wrote as a capstone project for my high school "Computer Architecture" class in 2006
;; DONALD GUY'S AMAZING UNSIGNED 32-bit INTEGER CALCULATOR!!
;;
;; written, after much research and testing, on December 30-31, 2006
;; (if Y2K hits seven years late, we will still have this ^_^)
;;
;; Limitations: can't work with negative numbers (though it has subtraction)
;; only works with a MAX sum, product, minuend, or dividend
;; of 4,294,967,295
;;
;; Target Archetectuire: IA32 system running a POSIX operating system in
@donaldguy
donaldguy / deobsfuscated-bti-audio.js
Created December 19, 2013 03:04
deobsfuscated http://becausetheinter.net/audio.js * Unrot13d comment on top * Spaced. * Replaced array access of encoded keywords with their values in place. * Switched from array-access to dot syntax. * Gave callable name to decode_str. * Assigned mnemonic names to other __0x variables
//Secret track
// -- removed _0xe7d4 keywords array
function playAudio(track_id) {
var audio_object = window.audioObjects[track_id];
if (audio_object) {
if (!audio_object.requestPlaying) {
audio_object.play();
} else {
@donaldguy
donaldguy / heavy_numbers.c
Created June 26, 2013 20:00
Semi-efficient heavy integer counter in C and Ruby for a code interview. The ruby is admittedly not very idiomatic (hence why I rewrote in C)
//
// main.c
// heavy_numbers
//
// Created by Donald Guy on 6/18/13.
// Copyright (c) 2013 Donald Guy. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
@donaldguy
donaldguy / word_search.rb
Created June 26, 2013 19:53
A Boggle-style word search done for a coding interview
require 'set'
$test_board = [['i', 'b', 't'],
['m', 'e', 's'],
['r', 'o', 'e']]
def valid_words_on_board(board, trie = Trie.new(word_list()))
valid_words = []
board = Board.new(board)