Skip to content

Instantly share code, notes, and snippets.

View sparrowu93's full-sized avatar
🎯
Focusing

Jack WU sparrowu93

🎯
Focusing
View GitHub Profile
@sparrowu93
sparrowu93 / redmine-osx-installation.md
Last active June 6, 2018 16:57 — forked from johnjohndoe/redmine-osx-installation.md
Redmine installation on macOS #2018

Redmine installation on MacOSX

  • A summarized instruction tested on macOSX 10.13 installing Ruby 2.4.1.

Install brew

  • Follow the instructions on https://github.com/mxcl/homebrew
  • $ /usr/bin/ruby -e "$(/usr/bin/curl -fsSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"

brew hints

@sparrowu93
sparrowu93 / jspb_parser.py
Last active March 16, 2018 09:32
protobuf .js file to origin .proto file
# usage: python3 [-h] [--js_path JS_PATH] [--js_library JS_LIBRARY]
# optional arguments:
# -h, --help show this help message and exit
# --js_path JS_PATH, -p JS_PATH
# javascript pb file path
# --js_library JS_LIBRARY, -l JS_LIBRARY
# the library name of pb
def is_repeat_needed(is_needed):
@sparrowu93
sparrowu93 / filedownload.py
Last active April 11, 2017 05:26
python large file download
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from pathlib import Path
import requests
from random import randint
base_timeout = 10
headers = {'User-Agent': '-UserAgentStrings-'}
# pip install fake-useragent

ESP8266 Web Server to storing ap config to EEPROM.

Original by chriscook8 from esp8266.com I just modified to use ESP8266WebServer library for easy to handle the http request.

This is sample code not yet complete.

Todo

  • when Wifi connected need to close the softAP.
@sparrowu93
sparrowu93 / Main.conf
Created November 9, 2015 04:50
Yet another config for Surge.app
[General]
# warning, notify, info, verbose
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, 100.64.0.0/10, localhost, *.local, e.crashlytics.com
bypass-tun = 0.0.0.0/8, 1.0.0.0/9, 1.160.0.0/11, 1.192.0.0/11, 10.0.0.0/8, 14.0.0.0/11, 14.96.0.0/11, 14.128.0.0/11, 14.192.0.0/11, 27.0.0.0/10, 27.96.0.0/11, 27.128.0.0/9, 36.0.0.0/10, 36.96.0.0/11, 36.128.0.0/9, 39.0.0.0/11, 39.64.0.0/10, 39.128.0.0/10, 42.0.0.0/8, 43.224.0.0/11, 45.64.0.0/10, 47.64.0.0/10, 49.0.0.0/9, 49.128.0.0/11, 49.192.0.0/10, 54.192.0.0/11, 58.0.0.0/9, 58.128.0.0/11, 58.192.0.0/10, 59.32.0.0/11, 59.64.0.0/10, 59.128.0.0/9, 60.0.0.0/10, 60.160.0.0/11, 60.192.0.0/10, 61.0.0.0/10, 61.64.0.0/11, 61.128.0.0/10, 61.224.0.0/11, 100.64.0.0/10, 101.0.0.0/9, 101.128.0.0/11, 101.192.0.0/10, 103.0.0.0/10, 103.192.0.0/10, 106.0.0.0/9, 106.224.0.0/11, 110.0.0.0/7, 112.0.0.0/9, 112.128.0.0/11, 112.192.0.0/10, 113.0.0.0/9, 113.128.0.0/11, 113.192.0.0/10, 114.0.0.0/9, 114.128.0.0/11, 114.192.0.0/10, 115.0.0.0/8, 116.0.0.0/8, 117.0.0.0/9, 117.128.0.0/10