Skip to content

Instantly share code, notes, and snippets.

View asus4's full-sized avatar
:octocat:
Working from home

Koki Ibukuro asus4

:octocat:
Working from home
View GitHub Profile
@asus4
asus4 / ArduinoSerial.cs
Last active June 24, 2016 00:58
Unityでいい感じにシリアル通信Wrapperする。
using UnityEngine;
using System.Collections.Generic;
using System.IO;
using System.IO.Ports;
using System.Threading;
using System;
namespace AppKit
{
/// <summary>
@asus4
asus4 / apcmini_display.py
Last active August 9, 2020 19:47
Show message on APC mini.
#!/usr/bin/env python
# coding: UTF-8
'''
Setup apc mini colors without Ablton Live
----------
> brew install portmidi
@asus4
asus4 / setup_apcmini.py
Last active April 29, 2023 02:19
Setup AKAI APC mini button colors without Ableton Live
#!/usr/bin/env python
# coding: UTF-8
'''
Setup apc mini colors without Ablton Live
----------
> brew install portmidi
@asus4
asus4 / lut_maker.py
Created April 3, 2016 11:43
Make LUT Texture
#!/usr/bin/env python
# coding: UTF-8
import cv2
import numpy as np
def make_lut256x16(exportPath):
''' 256 x 16 LUT '''
colors = []
@asus4
asus4 / checkSocialWebview.coffee
Created March 21, 2016 19:24
ブラウザが、facebookか、twitterアプリのwebviewで開かれたか判定!
checkSocialWebview = ()->
if document.referrer
if /m.facebook.com/.test(document.referrer)
return 'facebook'
if /t.co./.test(document.referrer)
return 'twitter'
return ''
@asus4
asus4 / MeshCode.coffee
Created February 21, 2016 12:09
地域メッシュの変換
# MeshCode - Japan local geo code
# https://ja.wikipedia.org/wiki/%E5%9C%B0%E5%9F%9F%E3%83%A1%E3%83%83%E3%82%B7%E3%83%A5
# http://www.stat.go.jp/data/mesh/pdf/gaiyo1.pdf
# https://github.com/letitride/python_util/blob/master/MeshCodeUtility.py
_GRID = {
FIRST : 0
SECOND : 1
THIRD : 2
HALF : 3
@asus4
asus4 / spread_snippets.js
Last active November 14, 2017 19:03
[google apps script] My spreadsheet snippets.
/**
* Simple Check sum
* @param {Array} arguments - 1D Array ex [A0:A6]
* @return {Number} checksum
*/
function CHECK_SUM() {
var arr = arguments[0].map(function(v){return v[0]});
var sum = arr.reduce(function(a, b){ return a + b});
return sum & 0xff;
}
@asus4
asus4 / websocket_osc_bridge.py
Created December 18, 2015 05:36
WebSocket to OSC bridge
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import json
from pyOSC import OSC
from SimpleWebSocketServer import WebSocket, SimpleWebSocketServer
# arguments
@asus4
asus4 / dropbox.js
Created December 7, 2015 10:45
Dropbox api v2 from GAS.
/**
* Dropbox api from GAS
*/
var Dropbox = (function() {
var DROPBOX_URL = "https://content.dropboxapi.com/2-beta-2/";
/**
* Constructor
* @param {string} token - the dropbox api token
@asus4
asus4 / ofxMackerel.cpp
Last active November 16, 2015 06:31
ofxMackerel
//
// ofxMackerel.cpp
//
// Copyright 2015 asus4
//
//
#include <Poco/Net/HTTPClientSession.h>
#include <Poco/Net/HTTPSClientSession.h>
#include <Poco/Net/HTTPRequest.h>