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
/** | |
* C99 features that don't work in C++ | |
* | |
* Written in 2011 by David Coles <[email protected]> | |
* | |
* 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. | |
*/ |
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 | |
# POSIX Alarm Timer example using Python ctypes | |
# | |
# Author: David Coles <[email protected]> | |
# 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. |
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 java.io.BufferedReader; | |
import java.io.IOException; | |
import java.io.InputStreamReader; | |
public class Main { | |
/** | |
* @param args the command line arguments | |
*/ |
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 ctypes | |
import sys | |
import os | |
import errno | |
FUNC = ctypes.CFUNCTYPE(None) | |
PROT_NONE = 0 | |
PROT_READ = 1 | |
PROT_WRITE = 2 |
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
# Simple Wrapper around XInput API | |
# | |
# Author: David Coles <[email protected]> | |
import ctypes | |
from ctypes.wintypes import BYTE, WORD, SHORT, DWORD | |
class XInputGamepad(ctypes.Structure): | |
_fields_ = [ |
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
#!/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 |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> |
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
# Print the number of bytes unread in a fifo. | |
# David Coles <[email protected]> | |
import argparse | |
import ctypes | |
import fcntl | |
import os | |
import sys | |
import termios |
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
/** | |
* Print size and contents of a PIPE | |
* Author: David Coles <[email protected]> | |
*/ | |
#define _GNU_SOURCE | |
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <sys/ioctl.h> |
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
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"log" | |
"net" | |
"net/http" | |
) |
OlderNewer