Skip to content

Instantly share code, notes, and snippets.

💭
脑壳疼

Josta Yee jostyee

💭
脑壳疼
  • Singapore
Block or report user

Report or block jostyee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View pihole.blacklist
dp3.qq.com
fusion.qq.com
pingtas.qq.com
huatuocode.weiyun.com
report.huatuo.qq.com
nex.163.com
sentry.music.163.com
yt-adp.ws.126.net
api.xmpush.xiaomi.com
hicloud.com
@jostyee
jostyee / karabiner_merge.sh
Created Jun 11, 2019 — forked from narze/karabiner_merge.sh
Merge karabiner.json with complex modification rules
View karabiner_merge.sh
#!/usr/bin/env bash
# Requirements : goku, jq
# 1. Make sure goku runs
goku
# 2. Make temp json file
cp ~/.config/karabiner/karabiner.json ~/.config/karabiner/karabiner.tmp.json
@jostyee
jostyee / pi-hole.sh
Created Mar 27, 2019
Run pi-hole in macOS
View pi-hole.sh
#!/bin/bash
# https://github.com/pi-hole/docker-pi-hole/blob/master/README.md
docker run -d \
--name pihole \
-p 53:53/tcp -p 53:53/udp \
-p 80:80 \
-p 443:443 \
-e ServerIP="$(ipconfig getifaddr en0)" \
View snell.service
[Unit]
Description=snell
After=network.target
[Service]
Type=simple
User=nobody
Group=nogroup
LimitNOFILE=32768
Restart=on-failure
View gomod_init.sh
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 / quantumult_filter.conf
Last active Sep 27, 2018
Rules for Quantumult app
View quantumult_filter.conf
// DEPRECATED, prefer https://gist.githubusercontent.com/jostyee/5d1f840bd8fd4ac53778a91ce13323b6/raw/quantumult_filter_select.conf
@jostyee
jostyee / build_nginx.sh
Created Sep 6, 2018
nginx_boringssl_tls1.3
View build_nginx.sh
#!/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
View .gitlab_ci.yml
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 Mar 21, 2018
URL shortening via goo.gl
View goo.gl.sh
#!/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 Mar 9, 2018
gbkzip - unzip Windows zip file and convert gbk to utf8 using Python 3
View gbkzip.py
#!/usr/bin/env python
#-*- coding:utf8 -*-
'''
YUCOAT的原脚本只适用于Python 2,改了下Python 3的版本
'''
import os
import sys
import zipfile
if __name__ == '__main__':
You can’t perform that action at this time.