Skip to content

Instantly share code, notes, and snippets.

View ITJesse's full-sized avatar
🦊

Jesse Zhu ITJesse

🦊
View GitHub Profile
@ITJesse
ITJesse / surge.conf
Last active October 17, 2015 03:23 — forked from soffchen/surge.conf
surge.conf
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
dns-server = 119.29.29.29, 223.5.5.5, 114.114.114.114
loglevel = notify
[Proxy]
Proxy = custom, server, port, rc4-md5, password, http://portal.itjesse.cn/SSEncrypt.module
[Rule]
#!/bin/sh
KERNEL_VERSION="3.13.0-29"
sudo apt-get update
sudo aptitude install -y linux-image-${KERNEL_VERSION}-generic \
linux-headers-${KERNEL_VERSION} linux-image-extra-${KERNEL_VERSION}-generic
sudo sed -i "s/GRUB_DEFAULT=.*/GRUB_DEFAULT=\"Advanced options for Ubuntu>Ubuntu, with Linux ${KERNEL_VERSION}-generic\"/" /etc/default/grub
sudo update-grub
@ITJesse
ITJesse / remove_jietumacapp
Created October 1, 2016 14:45
删除 QQ for Mac 的流氓截图
rm -rf /Applications/QQ.app/Contents/Library/LoginItems/JietuMac.app
mkdir /Applications/QQ.app/Contents/Library/LoginItems/JietuMac.app
chmod 444 /Applications/QQ.app/Contents/Library/LoginItems/JietuMac.app
#!/bin/bash
USERNAME=$1
PASSWORD=$2
KERNEL_VERSION=$3
if [[ ! -n $USERNAME ]]; then
echo "Usage: ubuntu-vps-init username password [kernal version]";
exit 2
fi
#!/bin/bash
sudo apt-get update && sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
LSB_RELEASE=`lsb_release -c | cut -c 11-16`
KERNEL_VERSION=`uname -r | cut -f1,2 -d"-"`
echo "deb https://apt.dockerproject.org/repo ubuntu-$LSB_RELEASE main" | sudo tee /etc/apt/sources.list.d/docker.list
curl http://blog.monstuff.com/ad-block-pac.js | \
grep dnsDomainIs | \
grep -v '//' | \
grep -v 'function' | \
awk -F '[""]' '{print $2}' | \
awk '$1 ~ /^\./ {printf "DOMAIN-SUFFIX,%s,ADBLOCK\n",substr($1,2)} $1 !~ /^\./ {printf "DOMAIN,%s,ADBLOCK\n",$1}' \
> adblock.txt
@ITJesse
ITJesse / tmp
Created February 15, 2018 06:29
{
"extends": [
"airbnb"
],
"env": {
"browser": true
},
"parser": "babel-eslint",
"rules": {
"indent": ["error", 2],
@ITJesse
ITJesse / API.md
Created April 2, 2018 09:12
Wechat Bot API

登陆接口

Request

{
	"username": "test",
	"password": "test
}
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/Homebrew/brew/tarball/master anywhere you like or
# change the value of HOMEBREW_PREFIX.
HOMEBREW_PREFIX = "/usr/local".freeze
HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze
HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze
HOMEBREW_OLD_CACHE = "/Library/Caches/Homebrew".freeze
BREW_REPO = "https://mirrors.ustc.edu.cn/brew".freeze
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core".freeze
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# This script installs to /usr/local only. To install elsewhere you can just
# untar https://github.com/Homebrew/brew/tarball/master anywhere you like or
# change the value of HOMEBREW_PREFIX.
HOMEBREW_PREFIX = "/usr/local".freeze
HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze
HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze
HOMEBREW_OLD_CACHE = "/Library/Caches/Homebrew".freeze
BREW_REPO = "https://mirrors.ustc.edu.cn/brew".freeze
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core".freeze