Skip to content

Instantly share code, notes, and snippets.

View RafikFarhad's full-sized avatar
😎

Rafik Farhad RafikFarhad

😎
View GitHub Profile
function dbash() {
( docker exec -it $* bash )
}
function dsh() {
( docker exec -it $* sh )
}
alias gss='git status'
alias ga='git add --all'
@RafikFarhad
RafikFarhad / default.conf
Last active February 14, 2019 20:31
A default NGINX Configuration file with cache support.
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;
@RafikFarhad
RafikFarhad / nginx.conf
Created November 29, 2018 07:48 — forked from ashleydw/nginx.conf
Laravel nginx conf file
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 <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 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;
@RafikFarhad
RafikFarhad / lemp_setup.sh
Created April 28, 2018 20:54
LEMP Stack for Ubuntu 18.04
#!/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}"
@RafikFarhad
RafikFarhad / README.md
Created September 29, 2017 10:04 — forked from hofmannsven/README.md
My simply Git Cheatsheet
/*
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();
}