This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /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 | |
# Setting the prefix from C-b to C-a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Terry's conky config | |
# .conkyrc since Ubuntu 8.04 LTS | |
background yes | |
use_xft yes | |
xftfont DejaVu Sans:size=9 | |
xftalpha 0.1 | |
update_interval 1.0 | |
total_run_times 0 | |
own_window yes | |
own_window_type normal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# runkexec | |
# | |
### BEGIN INIT INFO | |
# Provides: runkexec | |
# Required-Start: | |
# Required-Stop: | |
# Default-Stop: | |
# Description: Enable or disable fast system rebooting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -------------------------------------- | |
# | |
# Title: SSH Tunnel / Socks5 Proxy Script | |
# Author: Terry Wang | |
# Email: i (at) terry (dot) im | |
# Homepage: http://terry.im | |
# File: tunnel.sh | |
# Created: 1 Oct, 2012 | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# User ssh configuration file ~/.ssh/config | |
# Gist https://gist.github.com/terrywang/3997931 | |
# man ssh_config for more information | |
# Inspired by the blog post below to fight the NSA | |
# https://stribika.github.io/2015/01/04/secure-secure-shell.html | |
# Outside of the firewall, with HTTPS proxy | |
# Package connect-proxy is required. | |
# Amazon EC2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*filter | |
-P INPUT DROP | |
-P FORWARD ACCEPT | |
-P OUTPUT ACCEPT | |
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
# -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT | |
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT | |
-A INPUT -p icmp -m icmp --icmp-type 8 -j ACCEPT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# One liner | |
# mysqldump to stdout, pipe to xz for compression and then pipe to pv redirect to xz file | |
# pv is OPIONTAL, it is for showing the progress ONLY | |
# The - after xz -z is OPTIONAL, by default xz reads from stdin and writes to stdout | |
mysqldump -u confluenceuser -ppassword confluence | xz -z | pv > wiki_$(date +"%Y%m%d").xz | |
# Other 2 equivalant variants | |
# mysqldump -u confluenceuser -ppassword confluence | xz -z | > wiki_$(date +"%Y%m%d").xz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dscl . -read /Users/username JPEGPhoto | tail -1 | xxd -r -p > /path/to/accountImage.jpg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*filter | |
# Allow all loopback (lo) traffic and drop all traffic to 127.0.0.0/8 that doesn't use lo | |
-A INPUT -i lo -j ACCEPT | |
-A INPUT -d 127.0.0.0/8 -j REJECT | |
# Accept all established inbound connections | |
# -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT | |
# conntrack match is recommended | |
-A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT | |
# Allow all outbound traffic | |
# It can be modified to allow certain traffic ONLY |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# -------------------------------------- | |
# | |
# Title: Chef Solo Bootstrap | |
# Author: Terry Wang | |
# Email: i (at) terry (dot) im | |
# Homepage: http://terry.im | |
# File: bootstrap-ubuntu.sh | |
# Created: Feb, 2013 | |
# |
OlderNewer