Skip to content

Instantly share code, notes, and snippets.

@moxuse
moxuse / UnityOsc.hs
Created January 6, 2017 01:51
UnityOsc.hs
-- custom osc send to unity
module UnityOsc where
import Sound.Tidal.Stream
import Sound.Tidal.Pattern
import Sound.Tidal.Parse
import Sound.Tidal.OscStream
port = 5000
<!doctype html>
<html lang="ja">
<head>
<meta charset="utf-8">
<title>Ayu-Texture-Test</title>
<script src="http://threejs.org/build/three.min.js"></script>
<script src="http://code.jquery.com/jquery-1.12.1.min.js"></script>
</head>
<script type="x-shader/x-vertex" id="vs">
@moxuse
moxuse / pathToJson.jsx
Last active January 19, 2016 04:08
Adobe script. Split all anchors of path to json array
#target illustrator
var sel = app.activeDocument.selection;
var height_ = app.activeDocument.height
var file = File.saveDialog('save centers', 'center:*.txt');
var height_ = app.activeDocument.height
file.open('w')
file.write("[\n")
for(var i = 0; i < sel.length; i++){
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@moxuse
moxuse / gist:73cff10f4cfcace10121
Last active August 29, 2015 14:24
ofTrueTypeFont to ofVbo Texture
class SomeClass {
private:
string textString;
ofTrueTypeFont font;
ofTexture stringTexture;
ofVbo vbo;
ofMesh stringMesh;
ofVec3f verts[VERT_BUF_NUM];
@moxuse
moxuse / gist:77549fb5b79fbd43e94d
Last active August 29, 2015 14:24
Intel Edison IPカメラを認識させるためにリカバリーセットアップする
// poky 3.10.17 > からはデフォルトでuvccamera moduleがサポートされたので、自分でopkg install uvccamera する必要がない。
// 下手にするとカーネルモジュールが壊れる。
// https://software.intel.com/en-us/iot/hardware/edison/downloads > Release 2.1 Yocto* complete image をダウンロード
cd xxxx/paedison-image-ww25
//フラッシュを初期化、の前に
//macだとdfu-waitが長すぎて失敗するのでスクリプトを一部修正する必要が有る -> https://gist.github.com/ddewaele/f1b13545586c78ddb545
./flashall.sh
@moxuse
moxuse / gist:d08975cb02936fd07473
Last active March 10, 2016 05:23
oF on SAKURA VPS
// 前提条件
// サクラVPS OS Ubuntu 14.04
// 下準備
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install pkg-config
// linux用のoFをDLしてきて
//set server to gs server.
s=Server("Tamabi gs server", NetAddr("122.212.35.122", 57110));
(
SynthDef("despatch_radio_synth", {
|amp = 1,
azimuth = 111.9,
declination = -23.3,
distance = 31931930,
elevation = 20.3,
@moxuse
moxuse / GameViewController.swift
Created October 23, 2014 10:39
SceneKit Physics Test
import SceneKit
import QuartzCore
class GameViewController: NSViewController {
@IBOutlet weak var gameView: GameView!
override func awakeFromNib(){
let numBox = 300