Skip to content

Instantly share code, notes, and snippets.

View marschhuynh's full-sized avatar
🎯
Focusing

Marsch Huynh marschhuynh

🎯
Focusing
View GitHub Profile
@marschhuynh
marschhuynh / gist:d4688bd413788182668bcc7f0fa8b831
Created April 6, 2018 07:49
matplotlib in python with virtualenv
cd ~/.matplotlib
nano matplotlibrc
And then, write `backend: TkAgg`
@marschhuynh
marschhuynh / sign.sh
Created March 29, 2018 16:31
self-signed certificate
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/cert.key -out /etc/nginx/cert.crt
/* This stylesheet is generated, DO NOT EDIT */
/***********
* Globals *
***********/
* {
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
transition-duration: 0.2s; }
stage {
font-family: Liberation Sans, Droid Sans,Freesans, Sans-Serif;
@marschhuynh
marschhuynh / creator.sh
Last active February 27, 2018 04:42
Create macos installer
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction &&say Done
@marschhuynh
marschhuynh / dg.js
Last active January 17, 2018 01:52
$(".quesResult .quesRadioList, .quesCheckList").each(function(index, node){
inps = $(this).find(":input")
ans = Math.floor((Math.random() * inps.size()));
inps.each(function(idx, inp){
if (ans === idx) {
$(this).prop("checked", true)
}
})
})
https://medium.com/@emieljanson/make-your-mac-dock-appear-faster-7e70724cd5fb
defaults write com.apple.dock autohide-delay -float 0;
defaults write com.apple.Dock autohide-delay -float 0;
killall Dock
https://itunes.apple.com/us/app/pristen/id1322276830?l=vi&ls=1&mt=8
@marschhuynh
marschhuynh / git.sh
Last active December 11, 2017 14:27
List big file in git
git rev-list --objects --all | grep "$(git verify-pack -v .git/objects/pack/*.idx | sort -k 3 -n | tail -10 | awk '{print$1}')"
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch PATH-TO-YOUR-FILE-WITH-SENSITIVE-DATA' \
--prune-empty --tag-name-filter cat -- --all
@marschhuynh
marschhuynh / Debug android over wifi network.txt
Last active August 12, 2017 15:33
Debug android over wifi network
adb shell setprop service.adb.tcp.port 4444
adb tcpip 4444
adb connect 192.168.0.155:4444