Skip to content

Instantly share code, notes, and snippets.

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

Josta Yee jostyee

💭
脑壳疼
  • Singapore
View GitHub Profile
@jostyee
jostyee / quantumult_filter.conf
Last active September 22, 2021 02:27
Rules for Quantumult app
// DEPRECATED, prefer https://gist.githubusercontent.com/jostyee/5d1f840bd8fd4ac53778a91ce13323b6/raw/quantumult_filter_select.conf
@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
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 / 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)}' )
@jostyee
jostyee / gbkzip.py
Created March 9, 2018 04:44
gbkzip - unzip Windows zip file and convert gbk to utf8 using Python 3
#!/usr/bin/env python
#-*- coding:utf8 -*-
'''
YUCOAT的原脚本只适用于Python 2,改了下Python 3的版本
'''
import os
import sys
import zipfile
if __name__ == '__main__':
@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
@jostyee
jostyee / cVimrc
Last active February 23, 2018 06:15
config for cVim Chrome extension
let barposition = "bottom"
let searchlimit = 5
let searchalias g = "google"
let blacklists = ["https://inbox.google.com/*", "*://newsblur.com/*", "*://www.taobao.com/*"]
set autoupdategist
set noautofocus
set cncpcompletion
set nohud
#!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