Skip to content

Instantly share code, notes, and snippets.

@tgck
tgck / 01_getURLofFinderItems.rb
Last active February 13, 2016 16:11
[ruby][scriptingBridge] orgArray.arrayByApplyingSelector(:selector) を使って必要な情報をひっこぬく
a = finder.files
b = a.arrayByApplyingSelector(:URL)
# OK
b.each do |i|
puts i
end
# file:///Users/tani/Desktop/01.aif
# file:///Users/tani/Desktop/02.aif
# ...
@tgck
tgck / oscsender.sh
Created February 6, 2016 21:45
[osc][oscsend] パイプからoscsend
#!/bin/bash
ADDRESS="127.0.0.1"
PORT="1234"
TAG="/foo/message1"
TYPE=""
function usage() {
echo " Usage: echo message | ${0} "
echo " or : ${0} << (here document) "
@tgck
tgck / 01_get_pip_installed.md
Last active February 6, 2016 15:06
[log][python] pip / virtualenv / pyenv の導入

前提

  • OS X 10.9.5
  • システム標準の python は 2.7.5
  • pip, virtualenv はインストールされていない。
ipc:515$ python --version
Python 2.7.5
ipc:516$ which python
/usr/bin/python
@tgck
tgck / memo.md
Last active January 31, 2016 20:31
liblo がインストールされているかを確認する

####port 経由の場合

  • port のコマンドをつかう
$ port list installed | grep liblo
liblo                          @0.28           audio/liblo
$ 
@tgck
tgck / process.md
Last active December 20, 2015 13:44
cloudBit ディスクのマウントとアンマウント @ OS X 10.9
ファイルシステムを読書するツールのインストール
  • OSXFuse
  • fuse-ext2
ディスクの認識
  • mount コマンドでドライブのイメージパスを取得。
    ここでは "/dev/disk1s3" が osxfusefs_ext2 読取専用イメージであることがわかる
@tgck
tgck / list.txt
Last active December 20, 2015 09:15
cloudBits - /srv/
15 8 drwxr-xr-x 4 root wheel 4096 Jun 12 2014 ./srv/
1059 8 dr-xr-xr-x 2 root wheel 4096 Jun 12 2014 ./srv//ftp
1060 8 drwxr-xr-x 6 root wheel 4096 Jan 1 1970 ./srv//http
1061 8 drwxr-xr-x 2 33 _appstore 4096 Jan 1 1970 ./srv//http/header
3021 8 -rwxr-xr-x 1 33 _appstore 503 Jan 1 1970 ./srv//http/header/http-json.cgi
1062 8 drwxr-xr-x 2 33 _appstore 4096 Jan 1 1970 ./srv//http/set-wifi
3022 16 -rwxr-xr-x 1 33 _appstore 5385 Jan 1 1970 ./srv//http/set-wifi/index.cgi
1063 8 drwxr-xr-x 2 33 _appstore 4096 Jan 1 1970 ./srv//http/scan-wifi
3023 8 -rwxr-xr-x 1 33 _appstore 3344 Jan 1 1970 ./srv//http/scan-wifi/index.cgi
1064 8 drwxr-xr-x 2 33
@tgck
tgck / list.txt
Last active December 20, 2015 09:10
cloudBits - /usr/bin
total 141808
-rwxr-xr-x 1 root wheel 34612 Jun 12 2014 [
-rwxr-xr-x 1 root wheel 100968 Jun 12 2014 a2p
-rwxr-xr-x 1 root wheel 36792 Jun 12 2014 aclocal
-rwxr-xr-x 1 root wheel 36792 Jun 12 2014 aclocal-1.14
-rwxr-xr-x 1 root wheel 18336 Jun 12 2014 addftinfo
-rwxr-xr-x 1 root wheel 3126 Jun 12 2014 addgnupghome
-rwxr-xr-x 1 root wheel 18124 Jun 12 2014 addpart
-rwxr-xr-x 1 root wheel 22476 Jun 12 2014 addr2line
-rwxr-xr-x 1 root wheel 165872 Jun 12 2014 afmtodit
@tgck
tgck / inspectorWindow.tcl
Created June 27, 2015 13:25
[memo][tcl/tk] 変数とその値を整列表示するウィンドウ
# -----------------------------------
# window
# -----------------------------------
toplevel .w -class DialogWindow
wm minsize .w 250 20
# -----------------------------------
# frame
# -----------------------------------
@tgck
tgck / showVariable.tcl
Created June 21, 2015 12:44
[memo][proto][tcl/tk] wishで変数内容を表示するサンプル
## - GUIを更新するためのコマンドは不要
## - ラベルの作成時にラベルと値の格納用変数をバインドすればよいだけ
## また、値の格納変数は、あらかじめ宣言しておかなくてもOK
label .l -textvariable buffer ; pack .l
# Windowが表示され、領域は空欄で表示される
# センター寄せ.
set buffer 1
# 空欄 -> 1
@tgck
tgck / mouseWithSound11.maxpat
Last active August 29, 2015 14:22
[MaxMSP] Mouse with Sound (2013)
{
"patcher" : {
"fileversion" : 1,
"appversion" : {
"major" : 6,
"minor" : 0,
"revision" : 0
}
,
"rect" : [ 272.0, 44.0, 922.0, 636.0 ],