Skip to content

Instantly share code, notes, and snippets.

View beatgammit's full-sized avatar

Jameson Little beatgammit

View GitHub Profile
extern crate ggez;
use std::io;
use std::time::Instant;
use ggez::{event, graphics, Context, GameResult};
struct GameState;
impl event::EventHandler for GameState {
@beatgammit
beatgammit / fish_command_not_found.fish
Created January 27, 2015 19:41
nicer command not found handler for Arch using pkgfile
function fish_command_not_found --on-event fish_command_not_found
echo "fish: Unknown command '$argv'" >&2
if functions -q __fish_command_not_found_setup
functions -e __fish_command_not_found_setup
end
if which pkgfile ^/dev/null >/dev/null
if test (count $argv) -ge 1
if pkgfile --binaries $argv[1] ^/dev/null >/dev/null
echo -e "\n'$argv[1]' can be found in these packages:"
for pkg in (pkgfile --binaries "$argv[1]")
@beatgammit
beatgammit / patch-main.c
Created October 21, 2013 15:55
Patch for www/w3m on freebsd
--- main.c 2011-01-04 02:42:19.000000000 -0700
+++ main2.c 2013-10-21 09:31:27.000000000 -0600
@@ -833,7 +833,8 @@
mySignal(SIGPIPE, SigPipe);
#endif
- orig_GC_warn_proc = GC_set_warn_proc(wrap_GC_warn_proc);
+ orig_GC_warn_proc = GC_get_warn_proc();
+ GC_set_warn_proc(wrap_GC_warn_proc);
err_msg = Strnew();
@beatgammit
beatgammit / gist:6695858
Created September 25, 2013 06:34
pcbsd public key file
-----BEGIN PUBLIC KEY-----
MIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEAx4YxSavJkE7HjopkMtgK
tk/plcnImzfx0MmdK3ijv2724+v810kbAmRI01aiooQvusfcQ5OOyNpAzxwKMTTB
6bo46YtrnYBTP5G1mNqTRxL5Sg03Kpwcb6fCZ4gYOqTNPmhV6BskhRrfGOzNazcd
cb8CeqTeL7A44vwkyufQrSNgT9+ByCGuxaEp2os+GEbELyWZMmpQD6s2gAgpXuB6
K/f7pm9ZsULjJ+ZKc31TjgMTyVA07niocjDxiD2KVEbiagirnxA7BLa66u58B1ol
tnvOD8JNkGONT2LJhWOMXowZ8fCQ6Ec6ws2SY0UJ14d4w7xnz7U9+STHRYlJnNyl
ZYNLZ7UK7zyILWhAjkmq3TUaw7o456+QIyf4hA/he9UZhwhgRGNjJCUATbEUT+PF
65ox6+rT5g/jjDlY6kxfvLCTYJG/Arlj9FCAV/vBa/0lUu1OjivxPNK694G4tVHl
/z1yApzgzbOgkOY1caPCkGgniD2N4rySm744RxVXonrKmso9nsG0tGrDTC72M39Y
@beatgammit
beatgammit / MixColumns()
Created September 10, 2013 20:47
Pseudo-code for MixColumns
T. Jameson Little
CS 465
MixColumns Pseudo code homework
Globals
=======
mix_column_matrix = [
[02, 03, 01, 01],
[01, 02, 03, 01],
@beatgammit
beatgammit / PKGBUILD
Created March 14, 2013 01:38
PKGBUILD for ChromeDriver 26.0.1383.0
# Maintainer: grimsock <lord.grimsock at gmail dot com>
pkgname=chromedriver
pkgver=26.0.1383.0
pkgrel=1
pkgdesc="ChromeDriver is a standalone server which implements WebDriver's wire protocol"
arch=('i686' 'x86_64')
url="http://code.google.com/p/selenium/wiki/ChromeDriver"
license=('Apache')
depends=('chromium>=12.0.712.0' 'libpng12')
@beatgammit
beatgammit / NodeBoundaryValueTest.java
Created February 25, 2013 20:12
Blackbox Testing
package Model;
import static org.junit.Assert.*;
import java.util.ArrayList;
import java.util.List;
import org.junit.Before;
import org.junit.Test;
@beatgammit
beatgammit / Person.java
Last active December 12, 2015 01:18
Attempt at a super explicit class definition for CS 340. Pedigree is assumed to be a tree structure as described in getPedigree().
import java.util.Date;
/**
* @author T. Jameson Little
*
* Person represents a person in a family tree.
* For this application, father and mother are assumed to be biological parents.
*
* Domain:
* - birthdate: Date when the Person was born (Date object)
@beatgammit
beatgammit / gist:4084737
Created November 16, 2012 06:18
Derelict3/GLFW example in D
import std.stdio;
import derelict.opengl3.gl;
import derelict.glfw3.glfw3;
pragma(lib, "DerelictGL3");
pragma(lib, "DerelictGLFW3");
pragma(lib, "DerelictUtil");
pragma(lib, "dl");
@beatgammit
beatgammit / gist:3894337
Created October 15, 2012 18:51
JSON marshal/unmarshal
import std.conv;
import std.json;
import std.traits;
/* Marshal */
auto marshalJSON(T)(in T val) if (isSomeString!T) {
JSONValue ret;
ret.str = val;