Skip to content

Instantly share code, notes, and snippets.

View hackerbin's full-sized avatar
👨‍💻
Learning everyday

Nurul Huda Robin hackerbin

👨‍💻
Learning everyday
View GitHub Profile
#!/bin/bash
echo 'Nginx install script ubuntu'
if hash nginx 2>/dev/null; then
echo 'has nginx'
else
sudo apt update -y &&
sudo apt install curl gnupg2 ca-certificates lsb-release -y &&
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list &&
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - &&
#!/bin/bash
echo 'Nginx install script ubuntu'
if hash nginx 2>/dev/null; then
echo 'has nginx'
else
sudo apt update -y &&
sudo apt install curl gnupg2 ca-certificates lsb-release -y &&
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" \
| sudo tee /etc/apt/sources.list.d/nginx.list &&
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add - &&
LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient
https://askubuntu.com/questions/858178/how-to-install-bangla-font-in-ubuntu-16-04
sudo apt install fonts-beng
git clone https://github.com/hmoazzem/bangla-fonts.git; mkdir $HOME/.fonts/; cp -r bangla-fonts $HOME/.fonts/; fc-cache -f -v
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(filename)s %(funcName)s %(module)s %(message)s'
},
'basic': {
'format': '%(levelname)s %(message)s'
},
@hackerbin
hackerbin / .bashrc
Created January 4, 2020 05:58
Add bash aliases file bashrc
# include .bashrc if it exists
if [ -f $HOME/.bashrc_aliases ]; then
. $HOME/.bashrc_aliases
fi
--
.bash_aliases
alias gita='git add -A'
alias gits='git status'
Please feel free to file issues at https://github.com/flutter/udacity-course/issues. Flutter issues can be filed at https://github.com/flutter/flutter/issues.
You can also contribute changes. Setting up:
Fork https://github.com/flutter/udacity-course into your own GitHub account
git clone git@github.com:<your_name_here>/udacity-course.git
cd udacity-course
git remote add upstream git@github.com:flutter/udacity-course.git
Submitting changes:
@hackerbin
hackerbin / touch_windows_guidelines.txt
Created July 29, 2019 12:30
touch command in windows
# open powershell and run this command
New-item –type file –force $profile
# A file Microsoft.PowerShell_profile.ps1 will be created in
# C:\Users\<username>\Documents\WindowsPowerShell\ for PowerShell 5 and older or
# C:\Users\<username>\Documents\PowerShell\ for PowerShell 6 Core (this folder will be automatically created).
# If not found go to C:\Users\<username>\OneDrive\Documents\WindowsPowerShell\
# open Microsoft.PowerShell_profile.ps1; paste following function and save
function touch { if((Test-Path -Path ($args[0])) -eq $false) { set-content -Path ($args[0]) -Value ($null) } }
@hackerbin
hackerbin / test.conf
Created May 10, 2019 16:22
location /etc/nginx/conf.d
upstream test_server {
server unix:/home/shoriot/admin-django/server.sock fail_timeout=0;
}
server{
listen 80;
server_name localhost;
client_max_body_size 20M;
location = /favicon.ico { access_log off; log_not_found off; }
@hackerbin
hackerbin / test.service
Created May 10, 2019 16:21
target location /etc/systemd/system
[Unit]
Description=Test
After = network.target
[Service]
PermissionsStartOnly = true
PIDFile = /run/admin-django/admin-django.pid
User = shoriot
Group = www-data
WorkingDirectory = /home/shoriot/admin-django