Skip to content

Instantly share code, notes, and snippets.

@moxuse
moxuse / triangle stripe
Last active December 13, 2017 05:38
triangle stripe
void ofApp::triangleMesh(ofMesh && mesh, float radius) {
ofPoint capturedPoint, capturedPoint2;
for (int i = 0; i < 25; i+=2) {
mesh.addIndex(i);
mesh.addIndex(i + 1);
}
for (int i = 0; i < 25; i++) {
@moxuse
moxuse / OSCController.cs
Last active January 8, 2017 02:32
OSCController.cs
using UnityEngine;
#if UNITY_EDITOR
using UnityEditor;
#endif
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using UnityOSC;
@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
@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
<!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 / 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してきて
@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++){
@moxuse
moxuse / YAHooAPIKeyphraseService
Created October 23, 2013 07:49
YAHoo API KeyphraseService
#!/usr/bin/env python
# -*- coding:utf-8 -*-
import optparse
import httplib
from lxml import etree
# Yahoo!API config
appId = 'APPLICATION ID'
session = httplib.HTTPConnection('jlp.yahooapis.jp')
this.car_select = $("#swipe-section").children("img");
$('#carSelect').hammer({
prevent_default: true,
drag_vertical: true,
release: true
})
.on('drag dragend', function (ev) {
if (!self.isAnimating) {
var gest = ev.gesture;
switch (ev.type) {
// import UDP library
import hypermedia.net.*;
UDP udp;
void setup() {
udp = new UDP( this, 3054 ); //port from xbee wi-fi
udp.listen( true );
}