Skip to content

Instantly share code, notes, and snippets.

View distransient's full-sized avatar
🍜
Mmm noodles tasty

Kel distransient

🍜
Mmm noodles tasty
View GitHub Profile
package main
import "math"
type CartesianPoint struct {
x, y, z float32
}
// set Spherical location from Cartesian location
func (vector *CartesianPoint) ToSpherical () SphericalPoint {
func FastInvSqrt(x float32) float32 {
i := math.Float32frombits(0x5f3759df - math.Float32bits(x)>>1)
return i * (1.5 - (x * 0.5 * i * i))
}
func FastInvSqrt64(x float64) float64 {
i := math.Float64frombits(0x5fe6eb50c7b537a9 - math.Float64bits(x)>>1)
return i * (1.5 - (x * 0.5 * i * i))
}
/*!
* Font Awesome 4.0.3 by @davegandy - http://fontawesome.io - @fontawesome
* License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License)
*/@font-face{
font-family:'FontAwesome';
src:url('../fonts/fontawesome-webfont.eot?v=4.0.3');
src:url('../fonts/fontawesome-webfont.eot?#iefix&v=4.0.3') format('embedded-opentype'),url('../fonts/fontawesome-webfont.woff?v=4.0.3') format('woff'),url('../fonts/fontawesome-webfont.ttf?v=4.0.3') format('truetype'),url('../fonts/fontawesome-webfont.svg?v=4.0.3#fontawesomeregular') format('svg');
font-weight:normal;
font-style:normal
}
[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]](([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(![]+[])[!+[]+!![]]+([][[]]+[])[!+[]+!![]+!![]]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]
#/bin/bash
# You COULD do some flags here to run Linux executables
# Or you could switch out executable files based on distributable (Download Linux!/Download Windoze!)
# This works just fine with wine v1.7.19 as far as I can tell, with all the games just running inside of wine as well.
wine PirateLauncher0.3.exe

to build:

git clone https://gist.github.com/cca025b413c8300d6102.git && cd cca025b413c8300d6102
npm install crtrdg-gameloop crtrdg-keyboard matrix-utilities howler
browserify game.js -o o.js

Then open index.html in your browser.

@distransient
distransient / Example1.hs
Last active August 29, 2015 14:04
Helm Example Code Memory Leak
import FRP.Helm
import qualified FRP.Helm.Window as Window
render :: (Int, Int) -> Element
render (w, h) = collage w h [move (100, 100) $ filled red $ square 64]
main :: IO ()
main = do
engine <- startup defaultConfig
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env node --harmony
// todo: only worry about flags if this is the main module
var argv = require('minimist')(process.argv.slice(2))
var createClient = require('net-oce-protocol')
var duplex = require('duplexer')
var spawn = require('child_process').spawn
var path = require('path')
var inspect = require('util').inspect
var co = require('co')
@distransient
distransient / vimrc
Last active August 29, 2015 14:10
conf change notes
font: Anonymous Pro http://www.marksimonson.com/fonts/view/anonymous-pro