2014-11-30から1日間の記事一覧

Three.jsを使ったSTLのビューワ

https://gist.github.com/bellbind/477817982584ac8473efhttps://github.com/shohei/STLViewer

movをm4vにコマンドラインで圧縮変換する

http://stackoverflow.com/questions/15524776/ffmpeg-convert-mov-file-to-mp4-for-html5-video-tag-ie9 5分の1くらいに圧縮できた. $ ffmpeg -i input.mov -vcodec h264 output.m4v

Macからffmpegでサーバにストリーミングデータを投げる

ffmpegインストール brew install ffmpegサイズを320x240にしたらうまくいった. linuxでvideo4linux2にしてたところはqtkitにする. 参考: http://marctv.de/blog/tutorial-hd-pvr-twitch-mac-os-ffmpeg/ $ ffmpeg -f qtkit -i "default" -f mpeg1video -s…

SSH通信の遮断を防ぐ

http://askubuntu.com/questions/127369/how-to-prevent-write-failed-broken-pipe-on-ssh-connection VPSにSSHで入っていると,SSH: Broken pipeとなってSSH通信が遮断されることが多い. /etc/ssh/ssh_config(Linux) ~/.ssh/config(Mac)に以下を追加する.…

パブリックWi-fiでプロキシを使う(SSHポートフォワーディング)

ローカルの80番へのアクセスをVPSのsquidポートに転送する. 1023番以下のフォワーディングには管理者権限が必要. http://ts-engine.net/wp/archives/463うまくまとまってた. http://qiita.com/mechamogera/items/b1bb9130273deb9426f5

さくらVPSにsquidをインストール

http://ameblo.jp/yuu-sys-guard/entry-11858192189.html設定ファイルの変更と,ファイアウォールの設定でポートを開ける. /etc/squid/squid.conf 変更点 ... acl allow_hosts src xxx.xxx.xxx.xxx http_access allow allow_hosts ... http_port 31283 ... …

リバースポートフォワーディングしてRaspberry piに外からSSHで入る

やってみたらできた. raspberry pi側 ssh -N -R 8022:127.0.0.1:22 USER@VPS_ADDRESS -p VPS_PORT -i ~/.ssh/id_rsa_mbp2014mac側 VPSの仮想ポート(8022)に入ってraspiにリダイレクトしてもらう ssh pi@VPS_ADDRESS -p 8022 -i ~/.ssh/id_rsa

Raspberry piでライブストリーミング

http://phoboslab.org/log/2013/09/html5-live-video-streaming-via-websockets Websocketを使ってストリーミングする. 8082番のHTTPと8084のWSのポート開放は必要なかった. 構成 jsmpegを使う. https://github.com/phoboslab/jsmpegサーバ(VPS)側 git cl…

node.jsでUDPのサーバークライアント通信

外部とやる場合はポート開放、ポートフォワーディングが必要そう http://www.hacksparrow.com/node-js-udp-server-and-client-example.htmlclient.js var PORT = 33333; var HOST = '127.0.0.1'; var dgram = require('dgram'); var message = new Buffer('M…

STUNサーバを中継したUDPチャットのテスト

うまくいかなかった. vs-stun, sync-prompt, dgram利用udpTest.js var stun = require('vs-stun'); var socket, server = { host: 'stun.l.google.com', port: 19302 } var callback = function callback ( error, value ) { if ( !error ) { socket = valu…

node.jsで複数のユーザ入力を受け取る

https://github.com/shovon/sync-prompt npm install -g sync-promptvar prompt = require('sync-prompt').prompt; var name = prompt('What is your name? '); // User enters "Mike". console.log('Hello, ' + name + '!'); // -> Hello, Mike! var passwo…

node.jsでSTUNサーバにアクセスする

vs-stun NPMを使う var stun = require('vs-stun'); var socket, server = { host: 'stun.l.google.com', port: 19302 } var callback = function callback ( error, value ) { if ( !error ) { socket = value; console.log(socket.stun); socket.close(); …

node.jsでUDP通信を行なう

http://blog.katamari.co.jp/archives/550

BibTeXでnocite{}を使った時に引用順にする

Tex

nocite{*}だと.bibファイルに現れた順になるので, nocite{,}として指定する. http://tex.stackexchange.com/questions/56634/bibtex-ordering-by-appearence-of-the-bib-file-instead-of-the-tex-filekeyはgsedで抜き出す. http://unicus.jp/skmk/archive…