Skip to the relevant sections if needed.
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
# Connect to a WPA2 Enterprise network with wpa_supplicant with this .conf file. | |
# I used this to connect to my university's wireless network on Arch linux. | |
# Here's the command I used: | |
# | |
# wpa_supplicant -i wlan0 -c ./wpa_supplicant.conf | |
# | |
network={ | |
ssid="YOUR_SSID" | |
scan_ssid=1 |
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
\documentclass[10pt,landscape]{article} | |
\usepackage{ctex} | |
\usepackage{multicol} | |
\usepackage{calc} | |
\usepackage[landscape]{geometry} | |
\usepackage{color,graphicx,overpic} | |
\usepackage[T1]{fontenc} | |
\usepackage[bitstream-charter]{mathdesign} | |
\usepackage[utf8]{inputenc} |
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
[diff] | |
tool = meld | |
[difftool] | |
prompt = false | |
[difftool "meld"] | |
cmd = meld "$LOCAL" "$REMOTE" | |
[merge] | |
tool = meld | |
[mergetool "meld"] | |
cmd = meld "$LOCAL" "$MERGED" "$REMOTE" --output "$MERGED" |
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
Host * | |
ControlMaster auto | |
ControlPath ~/.ssh/sockets/%r@%h-%p | |
ControlPersist yes |
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
tcpdump advanced filters | |
======================== | |
Sebastien Wains <sebastien -the at sign- wains -dot- be> | |
http://www.wains.be | |
$Id: tcpdump_advanced_filters.txt 36 2013-06-16 13:05:04Z sw $ | |
Notes : |
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
# see https://www.topbug.net/blog/2013/04/14/install-and-use-gnu-command-line-tools-in-mac-os-x/ | |
# core | |
brew install coreutils | |
# key commands | |
brew install binutils | |
brew install diffutils | |
brew install ed --default-names | |
brew install findutils --with-default-names |
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
# Short of learning how to actually configure OSX, here's a hacky way to use | |
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise | |
alias man='_() { echo $@; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $@ 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $@; else man $@; fi }; _' |
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 8000
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
# string to hex | |
str2hex () { | |
echo -n "$@" | xxd -p | |
} | |
# httpdump | |
hdump() { | |
filter_cmd='s/^E.*?(GET|PUT|POST|HEAD|PATCH|CONNECT|DELETE|TRACE|OPTIONS|HTTP)/\1/' | |
if [ "$1" = "-m" ];then | |
method="0x`str2hex $2`" |
OlderNewer