Skip to content

Instantly share code, notes, and snippets.

@moxuse
moxuse / pathToJson.jsx
Last active Jan 19, 2016
Adobe script. Split all anchors of path to json array
View pathToJson.jsx
#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++){
View mounter_a_2015_08_13.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View mounter_b_2015_08_06.stl
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 Aug 29, 2015
ofTrueTypeFont to ofVbo Texture
View gist:73cff10f4cfcace10121
class SomeClass {
private:
string textString;
ofTrueTypeFont font;
ofTexture stringTexture;
ofVbo vbo;
ofMesh stringMesh;
ofVec3f verts[VERT_BUF_NUM];
@moxuse
moxuse / gist:77549fb5b79fbd43e94d
Last active Aug 29, 2015
Intel Edison IPカメラを認識させるためにリカバリーセットアップする
View gist:77549fb5b79fbd43e94d
// 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
View gist:d08975cb02936fd07473
// 前提条件
// サクラVPS OS Ubuntu 14.04
// 下準備
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install pkg-config
// linux用のoFをDLしてきて
View radio-despatch-synth.sc
//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 Oct 23, 2014
SceneKit Physics Test
View GameViewController.swift
import SceneKit
import QuartzCore
class GameViewController: NSViewController {
@IBOutlet weak var gameView: GameView!
override func awakeFromNib(){
let numBox = 300
@moxuse
moxuse / sample.sc
Created Oct 11, 2014
of_seminar_hatiouzi_2014 SC OSCSend Sample
View sample.sc
s.boot;
(
SynthDef("click",{
Out.ar(0,ClipNoise.ar(0.02) * EnvGen.ar(Env.perc(0.0,0.05,1,-2), 1, doneAction: 2));
}).store
)
(
@moxuse
moxuse / GameViewController.swift
Last active Aug 29, 2015
ScenKit Shader Handle Binding Test
View GameViewController.swift
import UIKit
import QuartzCore
import SceneKit
class GameViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
let numSphere = 25