2014-12-04から1日間の記事一覧

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…

Firewall busting(UDP Hole Punching)の例

http://www.rubyinside.com/skype-style-firewall-busting-with-ruby-and-udp-399.html require 'socket' remote_host = ARGV.first # Punches hole in firewall punch = UDPSocket.new punch.bind('', 6311) punch.send('', 0, remote_host, 6311) punch.cl…

wsモジュールでエコーサーバ

http://einaros.github.io/ws/

wsモジュールのクライアント側の例

http://ishiduca.hatenablog.com/entry/2012/04/20/102437

wsモジュールでsocket.ioモジュールのio.json.send()の代替

http://stackoverflow.com/questions/13028604/sending-a-javascript-object-through-websockets-with ストリン”ギ”ファイに注意. ws.send(JSON.stringify(object));

socket.ioサーバでXMLHttpRequest cannot load...Access-Control-Allow-Origin.エラーが出るとき

https://groups.google.com/forum/#!topic/socket_io/Fkq9Pyc8s6E io.set('origins','*:*');を追加する.

wsモジュールとsocket.ioモジュールの違い

クライアントから接続する際の待受け方法 ws(echo.websocket.orgはこっち?) var WebSocket = require('ws') , ws = new WebSocket('ws://echo.websocket.org/'); ws.on('open', function() { ws.send('something'); }); ws.on('message', function(message)…

Websocketのエコーテスト

wscatを使う wscat -c ws://echo.websocket.org connected (press CTRL+C to quit) > hoge < hoge > foobar < foobar >

SDPとICE Candidateの解読

SDP(Session Description Protocol) { "sdp": "v=0 o=- 3906791927516013147 2 IN IP4 127.0.0.1 s=- t=0 0 a=group:BUNDLE audio video a=msid-semantic: WMS TKMM4gYgo2chdd15vH5kcJpr2rE0cP37Lh8R m=audio 1 RTP/SAVPF 111 103 104 0 8 106 105 13 126 c=…

socket.io.jsの読込み

http://stackoverflow.com/questions/8689877/cant-find-socket-io-js <script src="<node.jsが立ち上がっているサーバ:ポート>/socket.io/socket.io.js"></script> のようにする.例えば <script src="http://localhost:9001/socket.io/socket.io.js"></script>

rfc5766-turn-server(STUNサーバ)のインストール

http://html5experts.jp/mganeko/5554/hiredisのインストール wget http://dl.fedoraproject.org/pub/epel/6/x86_64/hiredis-0.10.1-3.el6.x86_64.rpm sudo rpm -Uvh hiredis-0.10.1-3.el6.x86_64.rpm sudo yum install hiredisrfc5766-turn-serverのインス…

Centosにredisのインストール

http://qiita.com/n0bisuke/items/2448010c0dfaf8a20167

UDP Hole Punchingのテスト

http://www.rapapaing.com/blog/?p=24server.c // UDP hole punching example, server code // Base UDP code stolen from http://www.abc.se/~m6695/udp.html // By Oscar Rodriguez // This code is public domain, but you're a complete lunatic // if y…