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
root /var/www/html/; | |
# Add index.php to the list if you are using PHP | |
index index.html index.htm index.nginx-debian.html; | |
server_name _; | |
location ~ ([^\/]+)(?=\/.\.js$|\.js$){ | |
try_files $uri $uri/ /ui/$1.js; |
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
location ~ /assets/(.*) { | |
try_files $uri $uri/ /ui/assets/$1; | |
} | |
location ~ (([^\/]+)+(\.js|svg|eot|ico|woff2|ttf|woff|map$)) { | |
try_files $uri $uri/ /ui/$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
## | |
# You should look at the following URL's in order to grasp a solid understanding | |
# of Nginx configuration files in order to fully unleash the power of Nginx. | |
# http://wiki.nginx.org/Pitfalls | |
# http://wiki.nginx.org/QuickStart | |
# http://wiki.nginx.org/Configuration | |
# | |
# Generally, you will want to move this file somewhere, and start with a clean | |
# file but keep this around for reference. Or just disable in sites-enabled. | |
# |
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
private boolean getIsLowDevice(Context context) { | |
ActivityManager.MemoryInfo mi = new ActivityManager.MemoryInfo(); | |
ActivityManager activityManager = (ActivityManager)context.getSystemService(Context.ACTIVITY_SERVICE); | |
activityManager.getMemoryInfo(mi); | |
double availableMegs = (double)mi.availMem / 0x100000L; | |
String networkType = getNetworkClass(context); | |
return "2G".equalsIgnoreCase(networkType) || availableMegs <= 400; | |
} |
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
for entry in "."/* | |
do | |
if [[ "$entry" =~ .VOB$ ]]; then | |
/Applications/VLC.app/Contents/MacOS/VLC -I dummy --sout "#transcode{vcodec=h264,acodec=aac,ab=128,channels=2,samplerate=44100}:std{access=file,mux="mp4",dst=$entry.mp4}" "$entry" vlc://quit | |
fi | |
done |
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
echo "Enter your name:" | |
read NAME | |
echo "Enter your email:" | |
read EMAIL | |
# Install xcode console developer tools | |
xcode-select --install | |
# Git configuration | |
git config --global user.name $NAME |
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
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/sergeioff/.oh-my-zsh" | |
ZSH_THEME="agnoster" | |
COMPLETION_WAITING_DOTS="true" | |
plugins=( | |
git | |
autojump |
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
docker run --name mysql_test -e MYSQL_USER=test -e MYSQL_PASSWORD=test -e MYSQL_DATABASE=test -p 3380:3306 -d mysql/mysql-server | |
docker logs mysql_test 2>&1 | grep GENERATED |