Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
function dbash() { | |
( docker exec -it $* bash ) | |
} | |
function dsh() { | |
( docker exec -it $* sh ) | |
} | |
alias gss='git status' | |
alias ga='git add --all' |
server { | |
server_name _; | |
listen 80; | |
#charset koi8-r; | |
access_log /var/log/nginx/host.access.log main; | |
root /var/www/laravel/public; |
server { | |
listen 51; | |
root /usr/share/adminer; | |
# Logging | |
error_log /var/log/nginx/adminer.access_log; | |
access_log /var/log/nginx/adminer.error_log; |
server { | |
listen 80 default_server; | |
server_name example.com www.example.com; | |
access_log /srv/www/example.com/logs/access.log; | |
error_log /srv/www/example.com/logs/error.log; | |
root /srv/www/example.com/public; | |
index index.php index.html; |
#!/bin/bash | |
<<ReadMe | |
Author: Rafik Farhad <[email protected]> | |
Run: bash sudo <script.sh> | |
ReadMe | |
if [[ $(id -u) -ne 0 ]]; then | |
echo "Please run as root" | |
exit ; | |
fi | |
read -r -p 'Project Name: ' project_name |
server { | |
listen 50; | |
listen localhost:50; | |
server_name _; | |
root /var/www/pmad; | |
index index.php index.html index.htm; | |
location ~ \.php$ { | |
include snippets/fastcgi-php.conf; | |
fastcgi_pass unix:/run/php/php7.2-fpm.sock; |
#!/bin/bash | |
GREEN='\033[0;32m' | |
CYAN='\033[0;36m' | |
NC='\033[0m' | |
echo "${CYAN}Welcome to Easy LEMP Stack Setup${NC}" | |
echo "${CYAN}Ubuntu 18.04 Supported${NC}" | |
echo "${GREEN}Created By SUST CSE Developer Network (SCDN)\n${NC}" | |
echo "${GREEN}Maintained By Rafik Farhad\n${NC}" |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
/* | |
Full featured fraction class | |
*/ | |
template <class T = long long> struct Fraction { | |
T a, b; | |
Fraction (T a = T(0), T b = T(1)): a(a), b(b) { | |
this->Normalize(); | |
} |