Skip to content

Instantly share code, notes, and snippets.

View dcoles's full-sized avatar

David Coles dcoles

View GitHub Profile
#!/bin/bash
set -e
MINECRAFT_SERVER=minecraft_server.jar
MINECRAFT_SERVER_ARS=minecraft_server_ars.jar
FORGE=minecraftforge-universal-1.4.5-6.4.1.410.zip
ARS=ArsMagica_Open_Beta_RC_4.62.113
@dcoles
dcoles / xinput.py
Created December 26, 2012 07:15 — forked from anonymous/xinput.py
# Simple Wrapper around XInput API
#
# Author: David Coles <coles.david@gmail.com>
import ctypes
from ctypes.wintypes import BYTE, WORD, SHORT, DWORD
class XInputGamepad(ctypes.Structure):
_fields_ = [
@dcoles
dcoles / inline.py
Created November 14, 2012 09:13
Inline assembly in Python
import ctypes
import sys
import os
import errno
FUNC = ctypes.CFUNCTYPE(None)
PROT_NONE = 0
PROT_READ = 1
PROT_WRITE = 2
@dcoles
dcoles / Main.java
Created November 2, 2012 04:55
Igpay Atinlay
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
/**
* @param args the command line arguments
*/
@dcoles
dcoles / alarmtimer.py
Created March 20, 2012 07:30
POSIX Alarm Timers example using Python ctypes
#!/usr/bin/env python
# POSIX Alarm Timer example using Python ctypes
#
# Author: David Coles <coles.david@gmail.com>
# Date: 2012-03-19
#
# To the extent possible under law, the author(s) have dedicated all copyright
# and related and neighboring rights to this software to the public domain
# worldwide. This software is distributed without any warranty.
@dcoles
dcoles / c99-cxx.c
Created November 15, 2011 05:30
C99 features that don't work in C++
/**
* C99 features that don't work in C++
*
* Written in 2011 by David Coles <coles.david@gmail.com>
*
* To the extent possible under law, the author(s) have dedicated all copyright and related and
* neighboring rights to this software to the public domain worldwide.
* This software is distributed without any warranty.
*/