start new:
tmux
start new with session name:
tmux new -s myname
| # Modify this file accordingly for your specific requirement. | |
| # http://www.thegeekstuff.com | |
| # 1. Delete all existing rules | |
| iptables -F | |
| # 2. Set default chain policies | |
| iptables -P INPUT DROP | |
| iptables -P FORWARD DROP | |
| iptables -P OUTPUT DROP |
| git clone <repo-address> | |
| git tag -l | |
| git checkout <tag-name> | |
| git branch -D master | |
| git checkout -b master |
| ## Configure eth0 | |
| # | |
| # vi /etc/sysconfig/network-scripts/ifcfg-eth0 | |
| DEVICE="eth0" | |
| NM_CONTROLLED="yes" | |
| ONBOOT=yes | |
| HWADDR=A4:BA:DB:37:F1:04 | |
| TYPE=Ethernet | |
| BOOTPROTO=static |
| FILE SPACING: | |
| # double space a file | |
| sed G | |
| # double space a file which already has blank lines in it. Output file | |
| # should contain no more than one blank line between lines of text. | |
| sed '/^$/d;G' |
| var io = require('socket.io').listen(8000), | |
| nicknames = {}; | |
| io.sockets.on('connection', function (socket) { | |
| socket.on('user message', function (msg) { | |
| socket.broadcast.emit('user message', socket.nickname, msg); | |
| }); | |
| socket.on('nickname', function (nick, fn) { | |
| if (nicknames[nick]) { |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
| # /etc/network/interfaces | |
| # | |
| auto lo | |
| iface lo inet loopback | |
| # device: eth0 | |
| iface eth0 inet manual | |
| # IPv4 bridge | |
| # (connect ONLY your firewall/router KVM instance here, this is the WAN device!) |
| # /home/terrywang/.tmux.conf | |
| # Based on tmux book written by Brian P. Hogan | |
| # c-a o to switch to another panel | |
| # c-d to close shell | |
| # c-a ! to close panel | |
| # c-a w to list windows | |
| # c-a " split pane horizontally | |
| # c-a % split pane vertically | |
| # Configuration file for runtime kernel parameters. | |
| # See sysctl.conf(5) for more information. | |
| # See also http://www.nateware.com/linux-network-tuning-for-2013.html for | |
| # an explanation about some of these parameters, and instructions for | |
| # a few other tweaks outside this file. | |
| # | |
| # See also: https://gist.github.com/kgriffs/4027835 | |
| # | |
| # Assumes a beefy machine with lots of network bandwidth |