This file contains 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
int num = 2000; | |
int range = 6; | |
float[] ax = new float[num]; | |
float[] ay = new float[num]; | |
void setup() | |
{ |
This file contains 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 namedArgs(fn) { | |
var names = fn.toString().match(/function.*\(([^\)]+)\)/)[1].split(','); | |
return eval("(function(args) {\ | |
return fn(" + names.map(function(n) { return "args[\"" + n.trim() + "\"]"}).join() + ");\ | |
})"); | |
} |
This file contains 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
void Start () { | |
InvokeRepeating ("NewTarget", 3, 3); | |
} | |
void NewTarget() { | |
target = GameObject.FindGameObjectsWithTag ("Enemy").Where(go => go.transform.position.z > 5).Shuffle ().FirstOrDefault (); | |
} |
This file contains 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
(defn start [] | |
(invoke-repeating new-target 3 3)) | |
(defn new-target [] | |
(set! target (->> (unity/find :tag "Enemy") (filter #(> (.. % transform position z) 5)) (shuffle) (first))) |
This file contains 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
(defn PathFollower-Update [^UnityEngine.Component self] | |
(let [t (long (Time/get_time)) | |
tf (float (Time/get_time)) | |
^objects ary (.state self) | |
^object current-pos (aget ary t) | |
^object next-pos (aget ary (+ 1 t)) | |
;; generates fast code because it knows the type of self and trt | |
^System.Type trt UnityEngine.Transform | |
^UnityEngine.Transform transform (.GetComponent self trt)] ; |
This file contains 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 clojure.lang; | |
using System; | |
using UnityEngine; | |
public override object invoke (object obj) | |
{ | |
object obj2 = PathFollowerUnity$PathFollower_Update__32.__interop_state34 (obj); | |
object obj3 = ((object[])obj2) [(int)Time.time]; | |
object obj4 = ((object[])obj2) [(int)( + (double)Time.time)]; | |
object component = ((Component)obj).GetComponent<Transform> (); |
This file contains 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 override object invoke (object obj) | |
{ | |
// runtime call to binding gone, try/finally gone | |
object obj2 = PathFollowerUnity$fn__28$PathFollower_Update__47__51.__interop_state53 (obj); | |
object obj3 = ((object[])obj2) [RT.intCast (Time.time)]; | |
object obj4 = ((object[])obj2) [RT.intCast ((double)Time.time + (double))]; | |
object component = ((Component)obj).GetComponent<Transform> (); // same | |
object result; | |
// same | |
((Transform)component).localPosition = (Vector3)(result = Vector3.Lerp ((Vector3)obj3, (Vector3)obj4, (float)Numbers.remainder ((double)Time.time, ))); |
This file contains 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
Remote Address:66.6.43.30:443 | |
Request URL:https://www.tumblr.com/svc/post/upload_text_image | |
Request Method:POST | |
Status Code:200 OK | |
Request Headers | |
:host:www.tumblr.com | |
:method:POST | |
:path:/svc/post/upload_text_image | |
:scheme:https | |
:version:HTTP/1.1 |
This file contains 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/sh | |
#### NOT CONFIRMED WORKING YET #### | |
# on fresh ubuntu 14.04 | |
sudo apt-get install build-essential | |
sudo apt-get install gcc-arm-linux-gnueabihf g++-4.8-multilib-arm-linux-gnueabihf | |
apt-get install pkgconfig | |
sudo apt-get install git # do we need this? |
This file contains 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
# from https://github.com/atom/atom-shell/blob/master/docs/development/build-instructions-linux.md | |
# run as root on ubuntu 14.04 | |
# basic deps | |
apt-get install build-essential clang libgtk2.0-dev libnotify-dev gcc-multilib g++-multilib libgnome-keyring-dev | |
# node | |
apt-get install python-software-properties software-properties-common | |
add-apt-repository ppa:chris-lea/node.js | |
apt-get update |