Skip to content

Instantly share code, notes, and snippets.

View qinshulei's full-sized avatar
🎯
Focusing

Qin Shulei qinshulei

🎯
Focusing
View GitHub Profile
@qinshulei
qinshulei / rm_svn_files.sh
Created August 11, 2014 07:11 — forked from rafaelrinaldi/rm_svn_files.sh
rm all .svn form svn
# Remove SVN files from any folder
rm-svn-files() {
find "$1" -name *.svn | xargs rm -rf
}
@qinshulei
qinshulei / remove_svn.sh
Last active August 29, 2015 14:05
rm all .svn from svn
# Recursively remove all .svn directories
find . -name .svn -print0 | xargs -0 rm -rf
@qinshulei
qinshulei / h.sh
Last active August 29, 2015 14:15 — forked from fideloper/h.sh
improve history command with grep and percol
#! /bin/bash
function show_usage {
cat <<- _EOF_
Search Bash History using Grep and Percol
Examples:
$ h ssh
$ h 'ssh user@'
@qinshulei
qinshulei / gist:9a5d57bcc42ffecfcb42
Last active August 29, 2015 14:26 — forked from fungusakafungus/gist:1026804
bash retry function
function retry {
local retry_max=$1
shift
local count=$retry_max
while [ $count -gt 0 ]; do
"$@" && break
count=$(($count - 1))
sleep 1
done
@qinshulei
qinshulei / 0x8B1F
Created December 17, 2015 13:51 — forked from zealic/Email
Please use CAPTCHA as additional message
H4sIAAAAAAAAA6VRybKiQBC88xXvPofpBhE4zKEaBRFRG2xAbjQNiGwaLghfPxgx
fzB5qIrKyKglK1WypZrJhraQNVQIZCh5rqcGL/Q01wTiPylKkY6KhZwvC6xwJZXF
nJUCaQoyVCF+loYuVJxiQ+gplnGWqzpeGIbQuIbwcqlLf/4TUsU+6WmAvXnp3fUK
SgoNwFAfPAADvrCSxj+IKGGnDsxfmJzQlwznQHb+b09KYmickXxEFE7Cbt688148
oq5ZeVfH2pRQgmOW/WdXEZbarDxH6iTkcHQ2/tuxPzcpadljLjwoP5i3jZzE2ykJ
hq+wduxwD3HtEApTGqndcejHuZHDlazkkfXKA9JJWWs9s5G8k4pMXAkfs2iaRSVF
xoEii7lr/yJs9vK77ZuzZ5PH4p21tHdqYYcjmaRkXimGHkhA6nNcV26g2lzZPs/x
V4T3iU1nbiivQ3KYJ3fnryu2/+SBc3MjUkhWRVw+0GJlkpANN58FZJO1Bs5Wveve
gUBFXiLCVeSLG1TO3X3To3n1Ri8gR+9EsbQ3iemdiAWr9RHM+u7WtR2Ws4l20843
rmhIGEUXkgGvrXLoaJA9nLV1YFhYrLr4khfU/Y7C6AYIPIX6awr/MP/4L1driBiI
@qinshulei
qinshulei / eclipse_checkstyle560_android.xml
Created January 8, 2016 06:05 — forked from fredgrott/eclipse_checkstyle560_android.xml
eclipse checkstyle 5.6.0 forandroid
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN" "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<!--
This configuration file was written by the eclipse-cs plugin configuration editor
-->
<!--
Checkstyle-Configuration: Android Checks (Eclipse)
Description:
Slightly modified version of Sun Checks that better matches the default code formatter setting of Eclipse.
@qinshulei
qinshulei / git aliases.sh
Created April 6, 2016 06:53 — forked from tj/git aliases.sh
Some helpful git aliases
alias gd="git diff"
alias gc="git clone"
alias ga="git add"
alias gbd="git branch -D"
alias gst="git status"
alias gca="git commit -a -m"
alias gpt="git push --tags"
alias gp="git push"
alias gpr="git pull-request"
alias grh="git reset --hard"
@qinshulei
qinshulei / SimpleHTTPServerWithUpload.py
Created April 12, 2016 07:24 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@qinshulei
qinshulei / .bashrc
Created May 30, 2016 07:02
Some changes into .bashrc to se git on path and to use tmux better
# GIT
# Download this file https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh to ~/.git-prompt.sh
source ~/.git-prompt.sh
export PS1='\[\e[1;33m\]'$PS1'\[\e[1;32m\]$(__git_ps1 "(%s) ")\[\e[m\]'
# TMUX
export TERM=xterm-256color