Skip to content

Instantly share code, notes, and snippets.

@banthar
banthar / .gitignore
Created November 11, 2009 16:29
Go SDL bindings (new version here: http://github.com/banthar/Go-SDL)
**.o
**.8
_obj/
main
**.cgo?.go
**.cgo?.c
**.cgo?.8
sdl_defs.go
**~
@banthar
banthar / Main.hx
Created March 16, 2010 10:33
pollock
// haxe -lib neash -main Main -swf9 pollock.swf
import flash.display.Sprite;
import flash.display.Shape;
import flash.display.Stage;
import flash.display.StageScaleMode;
import flash.display.Bitmap;
import flash.display.BitmapData;
@banthar
banthar / reddit-notify.pl
Created April 7, 2010 11:39
reddit new message tray notify
#!/usr/bin/perl
use strict;
use warnings;
use LWP::Simple;
use Gtk2::TrayIcon;
# touch last_date
# wget "http://www.reddit.com/static/mailgray.png" "http://www.reddit.com/static/mail.png"
#
#!/usr/bin/perl
use DBI;
use LWP::Simple;
my $dbh = DBI->connect("dbi:SQLite:dbname=servers.sqlite3","","");
{
my $sth = $dbh->prepare("CREATE TABLE servertypes (name varchar(255));");
@banthar
banthar / mini.go
Created May 26, 2010 13:33 — forked from manveru/mini.go
package main
import (
"gl"
"sdl"
)
func main() {
if sdl.Init(sdl.INIT_VIDEO) != 0 {
println("Video initialization failed: " + sdl.GetError())
@banthar
banthar / Test.as
Created May 31, 2010 18:20
flash loop benchmark
package
{
import flash.display.Sprite;
import flash.utils.getTimer;
public class Test extends Sprite
{
private static var a:Array=new Array();
@banthar
banthar / xkcd_hell.user.js
Created June 14, 2010 18:30
hell tetris
// ==UserScript==
// @name XKCD Hell playable game
// @namespace http://example.com/
// @description Turns XKCD comic #724 into playable game
// @include http://xkcd.com/724/
// @version 1.0
// ==/UserScript==
/*
* Physaxe (http://code.google.com/p/physaxe/) copyright notice:
import flash.events.Event;
import flash.display.Bitmap;
import flash.display.BitmapData;
private class IPoint
{
public var x:Int;
public var y:Int;
@banthar
banthar / zelda_mapper.c
Created July 16, 2010 23:57
tiny game
#include <SDL.h>
#include <SDL_image.h>
typedef struct {int x,y;}Point;
int main()
{
SDL_Init(SDL_INIT_VIDEO);
@banthar
banthar / gist:659968
Created November 2, 2010 17:30
main.c
#include <windows.h>
#include <stdio.h>
void mouseDown(int button)
{
switch(button)
{
case 0:
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);