Skip to content

Instantly share code, notes, and snippets.

View geekrelief's full-sized avatar
🤖

Don-Duong Quach geekrelief

🤖
View GitHub Profile
// 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>();
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
// */});
/* 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;
#!/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
-- 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