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 UnityEngine; | |
using System.Collections; | |
using System.Collections.Generic; | |
public class CameraMouseController : MonoBehaviour { | |
public float translationSensitivity = 2; | |
public float zoomSensitiviy = 10; | |
public float rotationSensitiviry = 2; |
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
// Task definition {Cygwin} | |
%SystemDrive%\cygwin64\bin\bash.exe --login -i | |
// split console task (make sure Cygwin is in System path) | |
cygwin --login -i -cur_console:n | |
cmd -cur_console:s1TVn |
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
pandoc -s --self-contained --css myPretty.css readme.md -o readme.html |
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
public static class Extensions | |
{ | |
/// <summary> | |
/// extension method on Array of T | |
/// returns true if array only contains null items | |
/// </summary> | |
/// <typeparam name="T"></typeparam> | |
/// <param name="array"></param> | |
/// <returns></returns> | |
public static bool ContainsOnlyNullItems<T>(this T[] array){ |
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
Update | |
OnStateUpdate | |
OnAnimatorMove | |
OnStateMove | |
OnAnimatorIK | |
OnStateIK | |
LateUpdate |
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 UnityEngine; | |
using System.Collections; | |
[ExecuteInEditMode] | |
public class ShowGlobals : MonoBehaviour { | |
public Vector3 globalPosition; | |
public Vector3 globalRotation; | |
void Update () { |
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 libraries | |
var Twit = require('twit'), | |
inits = require('./inits'); | |
dbName = inits.dbName, | |
db = require('nano')("http://localhost:5984/" + dbName); | |
// instantiate twitter connection | |
var T = new Twit({ |
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
-- ghci.conf on windows | |
-- hoogle in ghci | |
-- requires hoogle on command line | |
-- $ cabal install hoogle | |
-- $ hoogle data | |
:def search (\ args -> return $ ":! hoogle " ++ args) | |
:def doc (\args -> return $ ":! hoogle --info" ++ 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
-- fmap :: (a -> b) -> f a -> f b | |
-- (.) :: (b -> c) -> (a -> b) -> a -> c | |
-- (a -> b) -> (e -> a) -> e -> b | |
-- | |
instance Functor ((->) e) where | |
fmap g h = g . h | |
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 Data.List | |
import Data.Char | |
numUniques :: (Eq a) => [a] -> Int | |
numUniques = length . nub | |
wordNums :: String -> [(String, Int)] | |
wordNums = tuplize . group . sort . words | |
where tuplize xs = map (\ all@(x:_) -> (x, length all) ) xs |