Skip to content

Instantly share code, notes, and snippets.

View pupboss's full-sized avatar

Jie Li pupboss

View GitHub Profile
@pupboss
pupboss / meltdownrootca.crt
Created August 11, 2021 14:32
Meltdown Research Root CA
-----BEGIN CERTIFICATE-----
MIIC7zCCAnWgAwIBAgIUE81+zAK74V8K5LTZorDYE5CuyGswCgYIKoZIzj0EAwMw
gZUxCzAJBgNVBAYTAlNHMRIwEAYDVQQHDAlTaW5nYXBvcmUxGjAYBgNVBAoMEU1l
bHRkb3duIFJlc2VhcmNoMSIwIAYDVQQLDBlNZWx0ZG93biBSZXNlYXJjaCBSb290
IENBMTIwMAYDVQQDDClNZWx0ZG93biBSZXNlYXJjaCBDZXJ0aWZpY2F0aW9uIEF1
dGhvcml0eTAeFw0yMDA1MjAwMDAwMDBaFw00MDA1MjAwMDAwMDBaMIGVMQswCQYD
VQQGEwJTRzESMBAGA1UEBwwJU2luZ2Fwb3JlMRowGAYDVQQKDBFNZWx0ZG93biBS
ZXNlYXJjaDEiMCAGA1UECwwZTWVsdGRvd24gUmVzZWFyY2ggUm9vdCBDQTEyMDAG
A1UEAwwpTWVsdGRvd24gUmVzZWFyY2ggQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkw
djAQBgcqhkjOPQIBBgUrgQQAIgNiAARdjPTsFWNeQ7O8PE7OUQnRpsqMOTi7vsza
@pupboss
pupboss / app.js
Created July 5, 2020 19:10
Improve rules
/*
* @Author: jetl
* @Date: 2020-07-06 02:51:46
* @Last Modified by: jetl
* @Last Modified time: 2020-07-06 03:05:01
*/
const fs = require("fs")
const content = fs.readFileSync('ShadowrocketAdb.conf').toString()
@pupboss
pupboss / ntuvpn.sh
Last active April 1, 2021 10:42
Shell script for NTU campus vpn connection
#!/usr/bin/expect
set timeout 10
spawn sudo openconnect ntuvpn.ntu.edu.sg --prot=pulse
expect "Password:"
send "ACCOUNTPWD\n"
expect "Realm"
send "Student\n"
@pupboss
pupboss / README.md
Created September 6, 2018 05:08
Robo3T on Ubuntu

Copied from https://gist.github.com/MatthewBooth/4374397107d1b05fd1f28e1e6dfbbefa , for backup use

  • Download the Binary from the official Robo3t Website.
  • Extract the archive to /opt/robo3t. You may need root permissions to do this.
  • Set the permissions to the current user sudo chown -R ${whoami}:${whoami} /opt/robo3t
  • Download this image http://blog.robomongo.org/content/images/2016/01/enjoy.png and save to /opt/robo3t/bin/robo3t.png
  • Make the binary executable sudo chmod +x /opt/robo3t/bin/robo3t
  • Create a desktop file and copy in the contents below. Call it robo3t.desktop.
  • Install this file using sudo desktop-file-install ~/Downloads/robo3t.desktop replacing ~/Downloads with the location you created the file
@pupboss
pupboss / oclint.sh
Created August 11, 2017 06:56
Script integrating OCLint into XCode. Put it in "Run script" build phase.
source ~/.bash_profile
cd ${SRCROOT}
xcodebuild -scheme <projectName> -workspace <projectName>.xcworkspace clean
xcodebuild -scheme <projectName> -workspace <projectName>.xcworkspace | xcpretty -r json-compilation-database --output compile_commands.json
oclint-json-compilation-database -exclude Pods -exclude build -exclude Internal -exclude ThirdParties -- -report-type xcode
@pupboss
pupboss / byebye.js
Last active December 29, 2016 12:58
一键删除知乎关注话题
var jq = document.createElement('script');
jq.src = "https://res.wx.qq.com/open/libs/jquery/2.1.4/jquery.js";
document.getElementsByTagName('head')[0].appendChild(jq);
$("a.TopicLink.PortraitItem-image").each(function(){
var num = this.href.replace('https://www.zhihu.com/topic/', '');
var remoteUrl = 'https://www.zhihu.com/api/v4/topics/' + num + '/followers';
$.ajax({
ruleSets:
- name: Potatso
rules:
# Default
- DOMAIN-SUFFIX,apple.com,DIRECT
- DOMAIN-SUFFIX,icloud.com,DIRECT
- DOMAIN-SUFFIX,itunes.com,DIRECT
# Proxy
- DOMAIN-SUFFIX,100lu.com,Proxy
@pupboss
pupboss / .surge.conf
Last active April 5, 2016 09:40
Surge For iOS & Mac Config Files
[General]
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local
bypass-tun = 0.0.0.0/8, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12
loglevel = notify
interface = 0.0.0.0
port = 1080
[Proxy]
DIRECT = direct
@pupboss
pupboss / blog.py
Created March 5, 2016 11:35
All Ghost article to Hexo md
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sqlite3
import time, datetime
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
cx = sqlite3.connect("/path/to/ghost.db")
@pupboss
pupboss / proxy.pac
Last active September 8, 2015 03:05
pac with squid/squid3 of gfw list
/**
* genpac 1.3.0 https://github.com/JinnLynn/genpac
* Generated: Tue, 08 Sep 2015 03:03:32 GMT
* GFWList Last-Modified: Wed, 19 Aug 2015 22:44:03 -0400
* GFWList From: online[https://raw.githubusercontent.com/gfwlist/gfwlist/master/gfwlist.txt]
*/
var proxy = "PROXY 128.xx.1xx.xx:21;";
var rules = [