Skip to content

Instantly share code, notes, and snippets.

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

Kel topokel

🍜
Mmm noodles tasty
View GitHub Profile
@topokel
topokel / 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

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.

#/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
[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]](([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(![]+[])[!+[]+!![]]+([][[]]+[])[!+[]+!![]+!![]]+[][(![]+[])[!+[]+!![]+!![]]+([]+{})[+!![]]+(!![]+[])[+!![]]+(!![]+[])[+[]]][([]+{})[!+[]+!![]+!![]+!![]+!![]]+([]+{})[+!![]]+([][[]]+[])[+!![]]+(![]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+[]]+([]+{})[!+[]+!![]+!![]+!![]+!![]]+(!![]+[])[+[]]+([]+{})[+!![]]+(!![]+[])[+!![]]]((!![]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(!![]+[])[+[]]+([][[]]+[])[+[]]+(!![]+[])[+!![]]+([][[]]+[])[+!![]]+([]+{})[!+[]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+[]]+([][[]]+[])[+!![]]+([][[]]+[])[!+[]+!![]+!![]]+(![]+[])[!+[]+!![]+!![]]+([]+{})[!+[]+!![]+!![]
/*!
* 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
}
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))
}
@topokel
topokel / main.go
Last active August 29, 2015 14:00
package main
import "math"
type CartesianPoint struct {
x, y, z float32
}
// set Spherical location from Cartesian location
func (vector *CartesianPoint) ToSpherical () SphericalPoint {
@topokel
topokel / command.sh
Created December 25, 2013 05:54
Convert audio and still image into video
ffmpeg -loop 1 -i input.jpg -i input.mp3 output.avi
var a = require('http')
, b = []
, c = {
host: 'api.randomuser.me'
, path: '/'
, port: 80
, method: 'GET'
}
, d = function (e) {
var f = ''
@topokel
topokel / app.js
Last active December 31, 2015 11:59
example of modeling webpages with javascript objects
var foobar = require('foobar')
, app = foobar()
// this is an example of an entire webpage modeled in this fashion.
// partials may be modeled in this way as well, and most of these
// values should get opinionated defaults
document = {
// automatically add these to the head, ease of use