start new:
tmux
start new with session name:
tmux new -s myname
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000Use TCPDUMP to Monitor HTTP Traffic
tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
tcpdump -A -s 0 'src example.com and tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)'
| ; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
| global start | |
| section .text | |
| start: | |
| push dword msg.len | |
| push dword msg | |
| push dword 1 | |
| mov eax, 4 |
| package main | |
| import ( | |
| "bytes" | |
| "code.google.com/p/go.crypto/ssh" | |
| "fmt" | |
| "log" | |
| "net" | |
| "os" | |
| ) |
| // https://blogs.oracle.com/janp/entry/how_the_scp_protocol_works | |
| package main | |
| import ( | |
| "fmt" | |
| "golang.org/x/crypto/ssh" | |
| ) | |
| const privateKey = `content of id_rsa` |
| default: | |
| @go get code.google.com/p/go.crypto/ssh | |
| go build -o bin/test_ssh_client *.go |
| # Install MacTex: http://mirror.ctan.org/systems/mac/mactex/mactex-basic.pkg | |
| $ sudo chown -R `whoami` /usr/local/texlive | |
| $ tlmgr update --self | |
| $ tlmgr install ucs | |
| $ tlmgr install etoolbox | |
| # Install pandoc view homebrew |
| # How to echobot with XMPP, BOSH, and Strophe | |
| 1. Setup ejabberd(http://www.ejabberd.im/) server and setup account [email protected] | |
| NOTE: localhost should be enough. If you setup something else, make sure you add it at /etc/hosts like this | |
| #/etc/hosts | |
| 127.0.0.1 localhost.local | |
| NOTE: Also download Psi(http://psi-im.org/), and make sure you can connect to your ejabberd server. | |
| 2. Download strophe(http://code.stanziq.com/strophe/) and place it (eg: /Users/makoto/work/sample/strophejs-1.0) |
| package cp | |
| import ( | |
| "io" | |
| "os" | |
| ) | |
| func cp(dst, src string) error { | |
| s, err := os.Open(src) | |
| if err != nil { |