Skip to content

Instantly share code, notes, and snippets.

Working from home

Hank Wang hanksudo

View GitHub Profile
hanksudo / purgeAndroid.txt
Created Mar 20, 2018 — forked from tahmidsadik112/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
View purgeAndroid.txt
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
hanksudo /
Created Oct 8, 2017
Python - class private publc
class Person:
def __init__(self):
def _single(self):
print "single"
def __double(self):
print "double"
hanksudo /
Last active Oct 8, 2017
Monacoin price notifier

Monacoin price notifier


brew install jq


hanksudo /
Last active Feb 20, 2019
Enable font anti-aliasing on VS Code
vim /Applications/Visual\ Studio\

add to .editor-container section

-webkit-font-smoothing: antialiased;
hanksudo / too many opened
Created Apr 6, 2017
resolve too many opened files in Python
View too many opened
$ ulimit -a

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 3868
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
hanksudo /
Last active Feb 21, 2017
Find newest note of every number occur and also remove duplicate number.
import itertools
def summarize_notes(case):
found = set()
for note, numbers in case:
snumbers = set(numbers)
output = list(snumbers - found)
found |= snumbers
if output:
hanksudo /
Last active Dec 9, 2016
20161209 ng tokyo


aws-cli - examples

STS - AWS Security Token Service

# whoami
aws sts get-caller-identity
hanksudo / gist:847fd0c35afe7929f0abbbb780c86557
Last active Apr 20, 2018
Install PHP 7 on Ubuntu 12.04
View gist:847fd0c35afe7929f0abbbb780c86557
sudo apt-get install python-software-properties
sudo LC_ALL=C.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php7.0-fpm php7.0-mysql -y

purge php5

sudo apt-get remove php5-common -y
You can’t perform that action at this time.