Skip to content

Instantly share code, notes, and snippets.

@comoc
comoc / file0.txt
Last active April 13, 2018 03:02
python-oscで0がFalseになってしまう時の対処方法 ref: https://qiita.com/comocc/items/f247b8d14a6067b4fc79
from pythonosc import osc_message_builder
from pythonosc import udp_client
if __name__ == "__main__":
client = udp_client.UDPClient("127.0.0.1", 5005)
msg = osc_message_builder.OscMessageBuilder(address="/my_address")
msg.add_arg(0)
msg = msg.build()
@comoc
comoc / cr.c
Last active October 27, 2017 12:56
ASCII文字の16進表現の値を調べる各種の方法 ref: http://qiita.com/comocc/items/0dab7f5aac9dc7e43d07
#include <stdio.h>
int main(void)
{
printf("%x\n", '\n');
return 0;
}
@comoc
comoc / file0.txt
Last active August 3, 2017 13:15
NNablaをWindows 10上のPython 3.5環境にインストールする ref: http://qiita.com/comocc/items/b5deb52bf99e5f193494
C:\Users\user>pip install nnabla
Collecting nnabla
Using cached nnabla-0.9.2-cp35-cp35m-win_amd64.whl
(中略)
copying skimage\_shared\tests\__init__.py -> build\lib.win-amd64-3.5\skimage\_shared\tests
running build_ext
No module named 'numpy.distutils._msvccompiler' in numpy.distutils; trying from distutils
customize MSVCCompiler
@comoc
comoc / file0.txt
Created April 20, 2017 05:09
Vagrant上のVMへのmecab-ipadic-neologdのインストールが失敗する時 ref: http://qiita.com/comocc/items/bfa5c4fe3c84d31e8ae7
(前略)
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
reading ./mecab-user-dict-seed.20170417.csv ... /home/ubuntu/mecab-ipadic-neologd/bin/../libexec/make-mecab-ipadic-neologd.sh: line 492: 2130 Aborted (core dumped) ${MECAB_LIBEXEC_DIR}/mecab-dict-index -f UTF8 -t UTF8
@comoc
comoc / file0.txt
Last active March 21, 2017 08:16
AutodeskのForge Viewerを利用してFBXファイルを表示する ref: http://qiita.com/comocc/items/04e6a06e87d06dac20da
curl -v 'https://developer.api.autodesk.com/authentication/v1/authenticate' \
-X 'POST' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=[CLIENT_ID]&client_secret=[CLIENT_SECRET]&grant_type=client_credentials&scope=bucket:create%20bucket:read%20data:write%20data:read'
@comoc
comoc / file0.txt
Created March 9, 2017 04:16
findした結果をまとめてjqコマンドで処理する ref: http://qiita.com/comocc/items/0337c942988c3031194e
find . -name "*.json" -exec sh -c "jq < {}" \;
@comoc
comoc / file0.txt
Last active August 19, 2019 10:13
UnityからArduinoのデータをシリアル経由で取得したい!確かにArduinoからは出力しているはずなのに何もやって来ない。そんな時の対策 ref: https://qiita.com/comocc/items/43794313413091f23368
Serial.print("Hello");
Serial.println("");
@comoc
comoc / IntervalTimer.swift
Created June 16, 2016 13:31
An interval timer.
class IntervalTimer {
enum Status { case STARTED, STOPPED, PAUSED }
var duration: Float = 0.0
var startTime: Float = 0.0
var fraction: Float = 0.0
var isLoop: Bool = false
var status: Status = .STOPPED
@comoc
comoc / app.js
Last active April 13, 2016 10:12
nodeのchild_processのexecが失敗する時の対策 ref: http://qiita.com/comocc/items/9a2236d32d257a840ef5
var exec = require('child_process').exec;
exec('foo bar', {cwd: 'C:¥somewhare'}, function(error, stdout, stderr) {
if (error != null) {
console.log(error);
}
});
@comoc
comoc / file0.txt
Last active May 26, 2016 10:53
node+socket.io+expressでサーバーとWebページ間で通信するためのスニペット ref: http://qiita.com/comocc/items/70358fc8e17df7a15098
.
|-- index.html
|-- index.js
|-- node_modules
|-- package.json