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
-- Parsec 3 tutorial code -- | |
-- module Main where -- this isn't necessary | |
import Text.Parsec | |
import Text.Parsec.String (Parser) -- type Parser = Parsec String () | |
import Text.Parsec.Expr | |
import qualified Text.Parsec.Token as P | |
import Text.Parsec.Language (haskellStyle) | |
import Data.Char |
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 | |
# prints a tree for the current dir or the one supplied | |
# if on ubuntu : sudo apt-get install tree | |
# if on mac : sudo port install tree | |
if [ "$1" == "" ]; then | |
eval "find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
else | |
eval "find $1 -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'" | |
fi |
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
/* compile.hxml | |
-swf-version 10 | |
-swf sfx.swf | |
-main Soundfx | |
-swf-header 600:400:30:ff6600 | |
*/ | |
// Soundfx.hx - example for playing back mp3s in haxe | |
import flash.media.Sound; |
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
function multilineString(_fn) | |
{ | |
// takes a function with a multiline comment in it and converts it to a multiline string | |
// | |
// example: | |
// var str = loq.mstring(function(){ | |
// /* | |
// 123 | |
// abc | |
// */}); |
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
// using System.Collections.Generic; | |
// using UnityEngine; | |
// using UnityEditor; | |
// for ordered selection | |
HashSet<GameObject> selectionSet = new HashSet<GameObject>(); | |
HashSet<GameObject> newSet = new HashSet<GameObject>(); | |
HashSet<GameObject> deleteSet = new HashSet<GameObject>(); | |
List<GameObject> selectionOrdered = new List<GameObject>(); | |
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
extends Node | |
var data:Dictionary #key: name:String, val:[Node, property:NodePath] | |
var handlers:Dictionary # key: name:String, val:[Node, meth name:String] | |
func dump(): | |
print("Data:") | |
for key in data: | |
print(String(path(key)) + ":" + String(property(key))) | |
print("\nHandlers:") |
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
extends Node | |
export var move_speed := 3.0 | |
var db | |
func _ready(): | |
db = get_node("/root/DataBind") | |
func _physics_process(delta): |
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
{ | |
"__type": "tm_ui_theme", | |
"name": "SynthMachine", | |
"colors": [ | |
{ | |
"name": "chrome_background", | |
"color": { | |
"r": 0.01967233046889305, | |
"g": 0.01114554610103369,{ | |
"__type": "tm_ui_theme", |
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
import macros | |
proc mysum(a, b, c, d:int) = | |
echo a + b + c + d | |
macro apply(fun, args: typed): untyped = | |
result = newCall(fun) | |
var funArgLen = getType(fun).len - 2 | |
case args.kind: | |
of nnkBracket: | |
for a in args: |
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
import std / macros | |
type | |
Vec[N: static[int], T] = object | |
arr: array[N, T] | |
Vec4[T] = Vec[4, T] | |
Vec4f = Vec4[float32] | |
var a: Vec4f | |
proc isTypeDesc(n: NimNode): bool = |
OlderNewer