Skip to content

Instantly share code, notes, and snippets.

View bl0ckeduser's full-sized avatar

Gabriel Cormier-Affleck bl0ckeduser

View GitHub Profile
@bl0ckeduser
bl0ckeduser / exefiles
Created November 11, 2012 22:16
Open .exe files intelligently
# Open .exe files in mono or wine depending
# on what the file(1) command says. Useful
# for practical double-clicking from a
# file manager.
if [ ! $1 ]
then
echo "Use: $0 file"
exit 1
fi
@bl0ckeduser
bl0ckeduser / gist:5092461
Created March 5, 2013 17:57
Open .exe files intelligently, version 2
# Open .exe files in mono or wine depending
# on what the file(1) command says. Useful
# for practical double-clicking from a
# file manager.
if [ ! "$1" ]
then
echo "Use: $0 file"
exit 1
fi
@bl0ckeduser
bl0ckeduser / mega-gaussian-elim.py
Created September 14, 2013 18:23
Improved gaussian reducer (supports expressions like ln(pi^2), uses fractions of bignums)
# Gaussian elimination
# -- fractional datatype version
# -- deluxe big integers and expressions edition
#
# By blockeduser the wannabe programmer
# Original clown version: September 1-3, 2012
# Python Deluxe big integers version: September 14, 2013
import sys
import re
@bl0ckeduser
bl0ckeduser / demo.py
Created December 24, 2013 20:10
pygame sloped platform game mini demo
#
# 2d platformer slope platform demo
# written to try to to help out someone on IRC
#
# controls:
# - left and right keyboard cursor keys: horizontal walking movement
# - up arrow cursor keyboard key: jump
#
# blockeduser
# Tue Dec 24 15:03:09 EST 2013
@bl0ckeduser
bl0ckeduser / avl.c
Created January 19, 2014 05:51
practicing AVL trees
/*
* trying to practice AVL trees
*
* input: numeric keys separated by newlines
* output: s-expression for final AVL tree,
* where nodes have format v=VALUE,h=HEIGHT
*
* Sun Jan 19 00:48:59 EST 2014
*/
@bl0ckeduser
bl0ckeduser / factorial.asm
Created February 15, 2014 17:54
MARS recursive factorial
# MARS recursive factorial
# Sat Feb 15 12:50:25 EST 2014
.data
title: .asciiz "factorials\n==========\n\n"
nfactis: .asciiz "! is "
newline: .asciiz "\n"
.text