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(); | |
| } |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
| #!/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}" |
| 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 | |
| <<ReadMe | |
| Author: Rafik Farhad <rafikfarhad@gmail.com> | |
| 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 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; |
| 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 { | |
| server_name _; | |
| listen 80; | |
| #charset koi8-r; | |
| access_log /var/log/nginx/host.access.log main; | |
| root /var/www/laravel/public; |
| function dbash() { | |
| ( docker exec -it $* bash ) | |
| } | |
| function dsh() { | |
| ( docker exec -it $* sh ) | |
| } | |
| alias gss='git status' | |
| alias ga='git add --all' |
| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://gist.github.com/1595572). | |
| # |