This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* MakeHDReflect() reads Mincraft Coder Pack files (MCP) to build mappings | |
* between Notchian names (Java classes with obfuscated class, method, | |
* and field names, released to the public by Mojang) and "human" names | |
* (names chosen by reverse engineers.) | |
* | |
* It returns an object that allows you to inspect its procedure and also | |
* to begin writing "human" Javascript code! | |
* | |
* This function returns an object. Below is a description of each property | |
* you can expect to find in that object. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/gsr | |
var prg = "./ioUrbanTerror.i386"; | |
//prg = "/usr/bin/env"; | |
const PTRSIZE = 8; | |
const ffi = require("gffi"); | |
const signal = require("signal"); | |
const {ByteArray,ByteString} = require("binary"); | |
const {include} = require("./include"); | |
const {Reader} = require("./readline"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from urllib2 import Request, urlopen | |
class ServerList(): | |
listName = None | |
def __init__(self, data): | |
self.headers = { 'User-Agent': 'Mozilla/5.0' } | |
self.servers = data['servers'] | |
if self.listName is None: | |
raise NotImplementedError("ServerList must override listName") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var util = require('./util') | |
, KeyValueStore = util.KeyValueStore | |
, aljebr = require('./aljebr') | |
; | |
function serializeExpression(expression) | |
{ | |
var eqNesting = 0; | |
function recurse(expression, parentOperator) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <type_traits> | |
using namespace std; | |
struct Nil { | |
typedef Nil Head; | |
typedef Nil Tail; | |
}; | |
template <typename H, typename T = Nil> struct Lst { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module com.codebad.shader; | |
import derelict.opengl3.gl3; | |
import file = std.file; | |
import std.exception : enforce; | |
import std.stdio : writeln, writefln; | |
import std.string : format, toStringz; | |
import std.traits : isPointer, PointerTarget; | |
import std.conv : to; | |
import std.path : baseName; | |
import std.traits : isSigned; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
T Clone(T)(T object) { | |
auto size = object.classinfo.init.length; | |
T ret = cast(T)((cast(void*)object)[0..size].dup.ptr); | |
return ret; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
words = filter(lambda s:all([ord(c)<128 for c in s]), map(str.strip, open('/usr/share/dict/words'))) | |
domainExp = re.compile('^[a-z0-9_]+$') | |
numbersExp = re.compile('[0-9]+') | |
englishWords = \ | |
filter( | |
lambda s: domainExp.match(s), | |
map(str.lower, | |
map(str.strip, | |
open('/usr/share/dict/words') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding=utf8 | |
""" | |
willie-chess.py - chess, duh | |
""" | |
# whipped this up at lunch. | |
# clone https://github.com/embolalia/willie | |
# put this in ./willie/modules | |
# create mysql database and table "chessgame" | |
# all moves are validated but en passant and castling aren't implemented |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import gtk, gtk.glade as glade | |
class Application(object): | |
def __init__(self): | |
self.glade = glade.XML('spritecaster.glade') | |
self.glade.signal_autoconnect({ | |
'on_window1_delete_event': self.delete_event, | |
'on_window1_destroy_event': self.destroy, | |
'on_auto_button_toggled': self.auto_tool_button, | |
'on_div_tool_button_toggled': self.div_tool_button, |
OlderNewer