Skip to content

Instantly share code, notes, and snippets.

View sixthgear's full-sized avatar

Joshua Cender sixthgear

View GitHub Profile
@sixthgear
sixthgear / librets_install.txt
Created October 21, 2015 06:59 — forked from dmpeters/librets_install.txt
librets installations with python bindings only
# Debian 7 x64, Ubuntu 14.04 x64, Ubuntu 12.04.4 x64
*NOTE (tested on Digital Ocean VM's w/ > 512MB of RAM - gcc runs out of memory on VM's <= 512 MB)
apt-get update
aptitude safe-upgrade
apt-get install build-essential libboost-all-dev libcurl4-gnutls-dev autoconf antlr swig python-dev
*NOTE (for python 3 support add 'python3-dev' to the end of line 5)
cd /tmp
wget https://github.com/NationalAssociationOfRealtors/libRETS/archive/1.6.1.tar.gz
main = getLine >>= \d -> putStrLn (decToRoman (read d :: Integer)) >> main
decToRoman :: Integer -> String
decToRoman dec
| dec >= 1000 = "M" ++ decToRoman(dec - 1000)
| dec >= 900 = "CM" ++ decToRoman(dec - 900)
| dec >= 500 = "D" ++ decToRoman(dec - 500)
| dec >= 400 = "CD" ++ decToRoman(dec - 400)
| dec >= 100 = "C" ++ decToRoman(dec - 100)
| dec >= 90 = "XC" ++ decToRoman(dec - 90)
@sixthgear
sixthgear / gist:cb300a2d9f5d1d5e3a43
Created December 12, 2014 16:23
GAME JELLY 2014

7D GAMEJELLY 2014

WTF?

Write an original game in at most seven working days. The gamejam will run for a the rest of year, so feel free to spread out those 7 days as you see fit. When you are finished, reply to this gist with a link to your public source code repository, and optionally binary downloads or playable web links.

@sixthgear
sixthgear / emperor.sh
Last active August 29, 2015 14:06 — forked from mariuz/emperor.sh
#!/usr/bin/env bash
### BEGIN INIT INFO
# Provides: emperor
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the uwsgi emperor app server
# Description: starts uwsgi emperor app server using start-stop-daemon
@sixthgear
sixthgear / gunicorn
Created August 22, 2014 20:36 — forked from xspager/gunicorn
#!/bin/sh
### BEGIN INIT INFO
# Provides: gunicorn
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the gunicorn server
# Description: starts gunicorn using start-stop-daemon
@sixthgear
sixthgear / sixthgear.tmTheme
Created August 2, 2014 05:44
My Sublime Theme
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>Tron</string>
<key>settings</key>
<array>
<dict>
<key>settings</key>
"""A simple implementation of a greedy transition-based parser. Released under BSD license."""
from os import path
import os
import sys
from collections import defaultdict
import random
import time
import pickle
SHIFT = 0; RIGHT = 1; LEFT = 2;
@sixthgear
sixthgear / gist:6943074
Last active December 25, 2015 07:59
##proggit Five Day Gamejelly

FIVE DAY GAMEJELLY

WTF?

Write an original game in at most five working days. The gamejam will run for a month, so feel free to spread out those 5 days as you see fit. When you are finished, reply to this gist with a link to your public source code repository, and optionally binary downloads or playable web links.

package main
import "math"
import "github.com/sixthgear/noise"
import "github.com/go-gl/gl"
type Vertex struct {
x, y, z float32
}
@sixthgear
sixthgear / map.py
Created June 3, 2013 22:22
Mad Science map class
from noise import perlin_noise as noise
from objects import building
from objects import tree
from pyglet.gl import *
import math
import random
import vector
tile_size = 32
tile_height = 24