2014-01-01から1年間の記事一覧

GitHubのShowcase

面白そうなのをメモ https://github.com/showcases/3d-modeling https://github.com/showcases/security https://github.com/showcases/machine-learning https://github.com/showcases/music

stlを操作するソフトウェア

STLのブーリアン演算 https://github.com/sshirokov/csgtool複数のSTLをまとめる https://github.com/sshirokov/stltwalker

GCode Viewer

http://gcode.joewalnes.com/ https://github.com/joewalnes/gcode-viewer

thingiverseのテンプレート

なんていうのかわかんないけどメモ thing tracker siteというのか https://github.com/garyhodgson/githubiverse-template http://garyhodgson.github.io/githubiverse-tst/ http://garyhodgson.com/reprap/2014/06/thing-tracker-site-template/ http://gar…

erlang appの起動

ebin/cowboy.appを起動したい http://stackoverflow.com/questions/16675767/how-to-run-erlang-rebar-build-application erl -noshell -pa ebin -s cowboy {"init terminating in do_boot",{undef,[{cowboy,start,[],[]},{init,start_it,1,[]},{init,start_…

Pythonのクラスの中でマルチスレッド

http://stackoverflow.com/questions/3221655/python-threading-string-arguments args=()のタプルの中は引数が一つの時はカンマを入れる import threading import time class Hoge: def __init__(self): Hoge.i = 0 def hoge(self,num): time.sleep(num) pr…

websocketの実装

SimpleHTTPServer.SimpleHTTPRequestHanlderを使った実装 こっちのほうがBaseHTTPRequestHandlerに近い? https://gist.github.com/SevenW/47be2f9ab74cac26bf21SocketServer.StreamRequestHandlerを使った実装 https://gist.github.com/jkp/3136208

websocifyでwebsocketのリレーサーバを作る

websockify https://github.com/kanaka/websockifyバイナリ指定が必要. http://stackoverflow.com/questions/15962359/websockify-error-client-must-support-binary-or-base64-protocol

node.jsでwssプロトコルを使う

wss://~で通信したいssl証明書の作成 http://www.maruko2.com/mw/Apache/SSL%E8%87%AA%E5%B7%B1%E8%A8%BC%E6%98%8E%E6%9B%B8%E3%81%AE%E4%BD%9C%E6%88%90%E3%81%A8mod_ssl%E3%81%AE%E8%A8%AD%E5%AE%9A openssl genrsa -aes128 1024 > server.key openssl req…

gitオブジェクトを展開する

cat "object" | ruby -rzlib -e 'puts Zlib.inflate(ARGF.read)' を使う. /usr/local/bin/inflate #!/bin/zsh if [ $# -ne 1 ]; then echo "Usage: inflate <zlib object>" exit 1 fi cat $@ | ruby -rzlib -e 'puts Zlib.inflate(ARGF.read)' 別の方法 .git/objects/a0/</zlib>…

nginxのWebsocketプロキシ

http://nginx.org/en/docs/http/websocket.html例 http://shokai.org/blog/archives/7396

WebsocketでTURNサーバを使う

https://groups.google.com/forum/#!topic/turn-server-project-rfc5766-turn-server/cPV2b0ol4K0 できないっぽい?

HTTP Tunnel

http://www.tomo.ac/goodstream/vpn/httptunnel/ http://www.httptunnelclient.com/html/sshをラップする必要はない?(環境的に可能なので) リモートポートフォワーディングをHTTPでラップできるなら 検討の余地はあるかも →ファイアウォールに穴を開けず…

Erangでエコーサーバ

http://qiita.com/tadokoro/items/25940a6210c0b99b940d

node.jsで動的リバースプロキシ

dynami-reverse-proxy https://www.npmjs.org/package/dynamic-reverse-proxy

nginxで動的リバースプロキシ

http://bad-know-how.blogspot.jp/2013/04/nginx.html http://d.hatena.ne.jp/hiboma/20120205/1328448746 lua-moduleとredisを使う.これでリバースプロキシのリモートフォワーディングが できれば良いのだが.

Macにnginxを再インストール

luaモジュールが欲しかったので入れなおした. nginx-fullを使う. http://kannokanno.hatenablog.com/entry/2014/02/10/134920 brew tap marcqualie/nginx brew install nginx-full --with-lua-modulehttp://kakakakakku.hatenablog.com/entry/2013/12/12/1…

Reverse HTTP

nginxのリバースプロキシだと,ポートマッピングをする度に サーバを再起動しないといけないから アプリケーション側から動的にクライアントの追加ができないのがネックだった.これだとサーバアプリケーション上で更新できそう. Erlang(mochiweb)で実装さ…

githubで同一マシン内で複数アカウントを使い分けてプッシュする

http://d.hatena.ne.jp/calpo/20120601/p1 別のssh keyを生成してgitubに登録 コンソール git config user.name "yourname" git config usre.email "your@email.com.ssh/config Host hoge.github.com User git Port 22 Hostname github.com IdentityFile ~/.…

git logでブランチのツリーを可視化する

http://irof.hateblo.jp/entry/20120710/p1 git log --oneline --graph --all

直近のコミットのハッシュを取得する

http://stackoverflow.com/questions/5694389/get-the-short-git-version-hash git rev-parse --short HEADあるいは git rev-parse --short HEAD | pbcopy

iOSにWebRTCをビルドする

http://qiita.com/ykst/items/412496713e1e887bcfca http://ninjanetic.com/how-to-get-started-with-webrtc-and-ios-without-wasting-10-hours-of-your-life/https://github.com/gandg/webrtc-ios

WebRTC Native APIのビルド

http://www.webrtc.org/reference/getting-started

GOの複数ファイルのビルド

http://stackoverflow.com/questions/10838469/how-to-compile-go-program-consisting-of-multiple-files ファイル構造が重要らしい. myproj/ src/ main.go second.go pkg/っていう状態でexport GOPATH=/path/to/myproj/ する で, cd myproj go install ap…

Haskellの実行方法

Hello.hs main = putStrLn "hello" ghc -e main Hello.hs runghc Hello.hs ghc -o Hello Hello.hs #これはできなかった ghc --make Hello.hs

sedで改行を削除する

http://www001.upp.so-net.ne.jp/hata/sed_reference.html sed ':loop; N; $!b loop; s/\n//g' input.txt例えばCのプロジェクトで以下のソースだとする. $ ls bridge.cpp inset.h polygonOptimizer.cpp sliceDataStorage.h bridge.h layerPart.cpp polygonO…

CuraEngineのconfigファイル

default.cfgがないと言われるけどサンプルが見つからなかった. ここでシェアしてる人がいた. http://forum.seemecnc.com/viewtopic.php?f=56&t=1716 https://www.dropbox.com/s/0quioiaw1eb0n6m/RostockMAX.ini RostockMAX.ini [profile] machine_center_x …

C++でnode.jsのパッケージを開発する

node-gypを使う http://navz.net/blog/?p=184

CentOSにnet-snmpのインストール

http://easyramble.com/install-and-setup-net-snmp.html

CentOS6にcactiのインストール

http://www.ipentec.com/document/document.aspx?page=linux-install-cacti-centos62&culture=ja-jp wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm rpm -ivh rpmforge-release-0.5.2-2.el6.rf.i686.rpm yum -y…