Skip to content

Instantly share code, notes, and snippets.

View jostyee's full-sized avatar
💭
脑壳疼

Josta Yee jostyee

💭
脑壳疼
  • Singapore
View GitHub Profile
[Unit]
Description=snell
After=network.target
[Service]
Type=simple
User=nobody
Group=nogroup
LimitNOFILE=32768
Restart=on-failure
@jostyee
jostyee / gomod_init.sh
Created September 25, 2018 13:32
Dep to go mod
GO111MODULE=on go mod init
GO111MODULE=on go mod vendor
git add go.mod go.sum vendor
git rm Gopkg.toml Gopkg.lock
@jostyee
jostyee / build_nginx.sh
Created September 6, 2018 03:07
nginx_boringssl_tls1.3
#!/bin/bash
set -ex
NGINX_VERSION="1.15.3"
BUILDROOT="/home/yee/ng"
sudo add-apt-repository ppa:gophers/archive
sudo apt update
sudo apt install -y build-essential uuid-dev dpkg-dev unzip cmake make
@jostyee
jostyee / sVimrc
Last active April 19, 2018 05:48
Personal Safari configs of https://github.com/flipxfx/sVim
" Settings
let homeurl = "https://www.google.com/ncr";
let blacklists = ["*://mail.google.com/*", "*://inbox.google.com/*", "*://go-talks.appspot.com/*", "*://newsblur.com/*", "*://cn.bing.com/*", "*://www.taobao.com/*"]
" Shortcuts
map "w" nextTab
map "q" previousTab
map "space" scrollFullPageDown
map "g b" scrollToBottom
@jostyee
jostyee / goo.gl.sh
Last active March 21, 2018 16:41
URL shortening via goo.gl
#!/bin/sh
# Create credential at https://console.developers.google.com/apis/credentials
echo -n $( curl "https://www.googleapis.com/urlshortener/v1/url?fields=id&key=$KEY" -H 'Content-Type: application/json' -d '{"longUrl": "$URL"}' -s | awk '/"id":/ {print substr($2, 2, length($2)-2)}' )
image: golang:1.10-alpine
stages:
- test
- build
before_script:
- go get -u github.com/golang/dep/cmd/dep
- mkdir -p $GOPATH/src
- cd $GOPATH/src
@jostyee
jostyee / android_captive_url.sh
Last active March 12, 2018 14:37
设置Android检测网络URL
adb shell settings delete global captive_portal_https_url
adb shell settings put global captive_portal_https_url https://developers.google.cn/generate_204
adb shell settings put global captive_portal_other_fallback_urls https://www.qualcomm.cn/generate_204
.frontbg {
background-color: #53cd80;
border-radius: 7px;
color: #fff;
position: relative;
left: 0;
}
.android .frontbg {
background-color: #eelf34;
border-radius: 7px;
@jostyee
jostyee / mas.link
Created February 24, 2018 07:45
Get macOS Sierra
#!MANAGED-CONFIG https://gist.githubusercontent.com/jostyee/561076f741d93b9c5c2924328d9d1cb6/raw/surge-cn.conf interval=259200 strict=true
[General]
loglevel = notify
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, ::ffff:0:0/96
ipv6 = false
allow-wifi-access = false
dns-server = 114.114.114.114, 223.5.5.5, system
external-controller-access = pwd@0.0.0.0:6155