Skip to content

Instantly share code, notes, and snippets.


Alan.He alanhg

View GitHub Profile
alanhg /
Last active Jul 16, 2022 / shell
# sudo sh -c "$(curl -fsSL"
YUM_CMD=$(which yum)
APT_GET_CMD=$(which apt-get)
APT_CMD=$(which apt)
if [ ! -z $YUM_CMD ]; then
yum install -y $PACKAGE
JamesHopbourn / 含参数的 URL Scheme 收集.md
Last active Sep 20, 2022
含参数的 URL Scheme 收集.md
View 含参数的 URL Scheme 收集.md

URL Scheme 数据清洗命令

cat AndroidManifest.xml|perl -ne 'print if /<data android:host=/'|
perl -pe 's/^.*<data android:host="(.*?)" android:path="(.*?)" android:scheme="(.*?)"\/>/\3:\/\/\1\2/'|
perl -pe 's/^.*<data android:host="(.*?)" android:scheme="(.*?)"\/>/\2:\/\/\1/'|
perl -pe 's/^.*<data android:host="(.*?)" android:pathPrefix="(.*?)" android:scheme="(.*)"\/>/\3:\/\/\1\2/'|
perl -pe 's/^.*<data android:host="(.*?)" android:pathPattern="(.*?)" android:scheme="(.*)"\/>/\3:\/\/\1\2/' > ' URL Scheme.txt'


vookimedlo /
Last active Apr 15, 2022
MacOS: mute & unmute from command line

Mute volume

osascript -e "set volume with output muted"

Unmute volume

osascript -e "set volume without output muted"
JBlond /
Created Jul 24, 2017 — forked from iamnewton/
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
rambolee /
Last active Aug 9, 2022
升级 小米路由器3 可以ssh 可以 Shadowsocks [Tags]: 小米路由, 小米路由3, 小米路由器, 小米路由器3, ssh, shadowsocks
#!/usr/bin/env python
# Generate a list of dnsmasq rules with ipset for gfwlist
# Copyright (C) 2014
# Ref
import urllib2
import re
parisk / default.js
Last active Jul 18, 2022
xterm.js keyMap
View default.js
* Example keymap for usage in xterm.js
* Original issue:
// We export this as default, since the only thing we care about
// is the contents of the keymap. No classes, methods or anything
// else is expected.
export default let keyMap =
condran /
Last active May 30, 2022
Spring Cloud Netflix with PATCH (client side)

Spring Cloud Netflix with PATCH (client side)

I have been researching Spring Boot and Spring Cloud, there are lots of goodies here but as with all technology there are gotchas.

Feign Client does not support PATCH out of the box! ಠ_ಠ ... ಠ~ಠ ... ⊙︿⊙

You might see an error like this if you try to use RequestMethod.PATCH in your @FeignClient interface: Invalid HTTP method: PATCH

I am using the current versions:

kolodny / proxy.js
Created Jan 4, 2016 — forked from cmawhorter/proxy.js
Node script to forward all http requests to another server and return the response with an access-control-allow-origin header. Follows redirects.
View proxy.js
// Simple proxy/forwarding server for when you don't want to have to add CORS during development.
// Usage: node proxy.js
// Open browser and navigate to http://localhost:9100/[url]
// Example: http://localhost:9100/
// This is *NOT* for anything outside local development. It has zero error handling among other glaring problems.
// This started as code I grabbed from this SO question:
squarism /
Last active Sep 26, 2022
An iTerm2 Cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)