Skip to content

Instantly share code, notes, and snippets.

@tknv
tknv / .muttrc
Created February 10, 2012 10:58
Configure Mutt for offlineimap
# It is simple, But powerful conf.
# offlineimap
source ~/.mutt/mailboxes
set mbox_type=Maildir
set folder = ~/.Maildir/mailbox
set from = "[email protected]"
set realname = "foo"
set spoolfile = "+INBOX"
set postponed = "+[Google Mail].Drafts"
@tknv
tknv / .offlineimaprc
Created February 10, 2012 10:52
offlineimap
[general]
# This should contain a comma delimited list of all identifiers of the accounts
# that are to be synced
accounts = main
# If there are two accounts; `main' and `alternative'...
#accounts = main,alternative
[mbnames]
enabled = yes
filename = ~/.mutt/mailboxes
#!/bin/sh
sudo cpufreq-set -c 0 -g performance
@tknv
tknv / one_liner_gc-for-git
Created February 1, 2012 11:27
GC for git
find . -type d -name .git | while read dir; do pushd “$dir”; git gc —prune; popd; done
@tknv
tknv / wpa-adhoc.conf
Created January 29, 2012 12:12
sample wpa-adhoc.conf
ap_scan=2
network={
ssid="oreore"
mode=1
frequency=2412
proto=WPA
key_mgmt=WPA-NONE
pairwise=NONE
group=TKIP
psk="bingobingo"
@tknv
tknv / etc-ppp-ip-up.d-KAISYA
Created November 5, 2011 16:49
add route after pon KAISYA
#!/bin/sh
if [ "${PPP_IPPARAM}" = "KAISYA" ];then
while [ -z `ifconfig | grep ${IFNAME}` ]
do
sleep 1
done
# accept forward
echo 1 > /proc/sys/net/ipv4/ip_forward
# add route
route add -net 172.20.0.0 netmask 255.255.0.0 dev ${IFNAME}
@tknv
tknv / gist:1250592
Created September 29, 2011 11:56
garbage collector
find . -type d -name .git | while read dir; do pushd "$dir"; git gc --prune; popd; done
31:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 141G 127G 7.8G 95% /
@tknv
tknv / one liner!
Created September 26, 2011 20:00
collect git object garbage all
find . -type d -name .git | while read dir; do pushd "$dir"; git gc --prune; popd; done
@tknv
tknv / client liner!
Created September 25, 2011 19:15
Live streaming client
mconnect foo.com 9940 | mpg123 -