This file contains hidden or 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
var http = require("http"), | |
url = require("url"), | |
path = require("path"), | |
fs = require("fs") | |
port = process.argv[2] || 8888; | |
http.createServer(function(request, response) { | |
var uri = url.parse(request.url).pathname | |
, filename = path.join(process.cwd(), uri); |
This file contains hidden or 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
# make commands interactive, essentially a bash version of http://thorstenball.com/fzz/. | |
# to use, copy to ~/.bash_profile or similar. requires ncurses. | |
# e.g. for an interactive `git grep`: | |
# interact git grep {{}} | ... | |
interact() { | |
# for printing ui create fd pointing to tty, | |
# in case stdout is redirected | |
exec 3> /dev/tty |
This file contains hidden or 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
# | |
# A CORS (Cross-Origin Resouce Sharing) config for nginx | |
# | |
# == Purpose | |
# | |
# This nginx configuration enables CORS requests in the following way: | |
# - enables CORS just for origins on a whitelist specified by a regular expression | |
# - CORS preflight request (OPTIONS) are responded immediately | |
# - Access-Control-Allow-Credentials=true for GET and POST requests |
This file contains hidden or 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
var PIXI = require('pixi.js') | |
console.log(PIXI) |
This file contains hidden or 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
<snippet> | |
<content><![CDATA[${1:test_name}_(${2:_State}) -> | |
{"${3:description}", | |
fun() -> | |
${4:ok} | |
end}.]]></content> | |
<tabTrigger>eunit</tabTrigger> | |
<scope>source.erlang</scope> | |
<description>EUnit Test Case</description> | |
</snippet> |
This file contains hidden or 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
while sleep 1; do | |
file='test'; | |
lead='__lua__'; | |
tail='__gfx__'; | |
gsed -i -e "/$lead/,/$tail/{ /$lead/{p; r $file.lua | |
}; /$tail/p; d }" $file.p8; | |
done |
This file contains hidden or 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 | |
# see https://github.com/porglezomp-misc/live-reloading-rs/issues/1 | |
set -e | |
name="libreloadable" | |
extension="dylib" | |
dir="./target/debug" | |
path="${dir}/${name}.${extension}" |
This file contains hidden or 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
fn main() { | |
let config = ul::Config::new(); | |
let mut ul_app = ul::UltralightApp::new(Some(config)); | |
ul_app.window(1024u32, 1024u32, false, false, true, true, false); | |
let mut ul = ul::Ultralight::new(None, Some(ul_app.get_renderer())); | |
ul.set_view(ul_app.get_view().unwrap()); |
This file contains hidden or 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 | |
# see https://github.com/porglezomp-misc/live-reloading-rs/issues/1 | |
set -e | |
name="libreloadable" | |
extension="so" | |
dir="./target/debug" | |
path="${dir}/${name}.${extension}" |
This file contains hidden or 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
# NB: assumes an orthogonal camera and quad mesh geometry | |
fn _process(_delta) { | |
# set this to an instance of AtlasTexture | |
var atlas_tex = ... | |
# set this to an instance of Material | |
var material = ... | |
# optionally center the sprite around a point relative to the top-left corner | |
var center = Vector2(0, 0) |
OlderNewer