Skip to content

Instantly share code, notes, and snippets.

View tao12345666333's full-sized avatar
🎯
Focusing

Jintao Zhang tao12345666333

🎯
Focusing
View GitHub Profile
@tao12345666333
tao12345666333 / show-git-branch
Created July 22, 2014 14:49
show git branch in bash shell
function git_branch {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return;
echo "("${ref#refs/heads/}") ";
}
PS1="[\[\e[1;35m\]\u\[\e[1;32m\]\w\[\e[0m\]] \[\e[0m\]\[\e[1;36m\]\$(git_branch)\[\e[0;33m\]\$"
@tao12345666333
tao12345666333 / AboutMoeLove.js
Created May 7, 2014 12:41
About (Code Version)
(+[[]+(1<<1<<1<<1)+(1^1<<1)+(1<<1>>1)+(-~1<<1<<1)+(1.1>>1.1)+(11>>>1)])[[(!!/-/+{})[111^111]+[[]+{}][!1&.1][1|1>>1|1]]+([111/[]+[]][+(1>1)][([]+{})[11-1>>1]+[[],[]+{}+[]][[]+1][1]+(/^/[1]+[])[1|1>>1|1]+[{},1e1,!{}+[]][1+1][1<<1^1]+(11/!{}+{})[~1+1e1+~1]+[!!{}+{}][[]&111][1&1]+(/^/[111]+[])[11^11]+[{},[{}]+{},1][1+[]][11-~1+11>>1]+(!!1+{})[1&1>>1]+([]+{1:1}+[])[1|1]+[[]+!!1][111>>>111][1<<1>>1]]+[])[([]+![111])[1|1<<1|1]+[/=/,[]+[][11]][1|[]][1>>1]+([{}]+{})[1+!![1]]+[1,!1+/~/][1%11][1^1<<1]+(111/[]+{})[~1+1e1+~1]+[!!/-/+/-/][111%111][+!!1]]((~1+1e1+1)+((!1&.1)==([]+/-/[(!![111]+{})[1^1]+(!![1]+[])[1<<1^1]+(!{}+{})[1^1<<1]+(!![1]+/-/)[+(1>1)]])[+(1>1)]),1-~1<<1)](~1-~1e1<<1<<1)+":"+(([]===[])+/-/)[5]+(([]===[])+/-/)[5]
//http://
"."+
(+[[]+([]+1)+(1-~1<<1)+(1+1<<1)+(1|1<<1)+(1<<1<<1<<1)])
[[(!!1+{})[!1&.1]+[[]+{}+[]][1&[]][1+[]]]
+([11/[]+{}][+(111>111)][([{}]+[{}])[1e1>>1]+[[],[]+{}][[]+1][+!!1]+(/^/[111]+/&/)[1&1]+[{},1e1,!1+[]][1<<1][1^1<<1]+(111/!{}+/1/)[~1+1e1+~1]+[!!/-/+[]][11>>11][1|1]+([][1]+/&/)[1.
@tao12345666333
tao12345666333 / hostapd建立wifi
Created March 30, 2014 10:13
fedora 18 建立wifi热点
$  sudo yum install hostapd
建立hostapd 配置文件
$ cat /etc/hostapd/hostapd.conf
##----------hostapd.conf----------##
interface=wlan0
driver=nl80211
hw_mode=g
channel=10
macaddr_acl=0
auth_algs=3
rh 6.0 kickstart with gpt.
1. add necessary service, remove unnecessary service
2. The last section starting with "#$SNIPPET('custom/xxyy')" are some post install scripts:
* modify /etc/hosts
127.0.0.1 localhost.localdomain localhost
private_ip hostname.jaseywang.me hostname
* remove zero route
* add some parameters to kernel options
* disable ipv6
* add ntp server for each server to sync time