This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
web: | |
image: nginx:stable-alpine | |
volumes: | |
- ./code:/usr/share/nginx/html | |
ports: | |
- "8080:80" | |
environment: | |
- NGINX_HOST=localhost.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Python has a HTTP server built into the | |
# standard library. This is super handy for | |
# previewing websites. | |
# Python 3.x | |
$ python3 -m http.server | |
# Python 2.x | |
$ python -m SimpleHTTPServer 8000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# diff between two branches | |
git diff [commit id 1] [commit id 2] | |
# diff between current branch and another | |
git diff [commit id] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --all --graph --pretty=format:'%C(auto)%h%C(auto)%d %s %C(dim white)(%aN, %ar)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff-tree --no-commit-id --name-status -r [commit id] | |
# The --no-commit-id suppresses the commit ID output. | |
# The --pretty argument specifies an empty format string to avoid the cruft at the beginning. | |
# The --name-status argument shows the file names that were affected and the status. | |
# The -r argument is to recurse into sub-trees |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git log --all --full-history -- [path/file] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script | |
src="https://code.jquery.com/jquery-3.2.1.min.js" | |
integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4=" | |
crossorigin="anonymous"></script> | |
<script | |
src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/3.1.9-1/crypto-js.min.js" ></script> | |
<script type="text/javascript"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pass the device name as parameter | |
GENY_HOME=~/tools/genymotion | |
$GENY_HOME/player --vm-name $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# you android_home, something like '/home/user/Android/Sdk/' | |
cd $ANDROID_HOME | |
./tools/emulator -list-avds | cat -n | |
printf "Select AVD: " | |
read index | |
avd=$(./tools/emulator -list-avds | sed "${index}q;d") | |
echo "Selected $avd" | |
./tools/emulator -netdelay none -netspeed full -avd $avd |