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
@hackerbin
hackerbin / useful_commands.sh
Last active May 6, 2019 07:34
some useful bash commands and scripts
#clear linux cache
sync ; echo 3 | sudo tee /proc/sys/vm/drop_caches
# download all bangla font in linux
wget --no-check-certificate https://raw.githubusercontent.com/fahadahammed/linux-bangla-fonts/master/font.sh -O font.sh;chmod +x font.sh;bash font.sh;rm font.sh
# remove nginx cache
sudo rm -rf /var/cache/nginx/*
# without pass sudoer user
# login with cli
psql -U username
example: psql -U postgres
# see available databases list
\l
# see available tables
\dt
# First, install all of the things
sudo su
apt-get update
apt-get install nginx
/etc/init.d/nginx start
sudo apt-get install python-dev
sudo apt-get install python-pip
sudo add-apt-repository "deb http://security.ubuntu.com/ubuntu xenial-security main"
sudo apt update
@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
@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 / 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) } }
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 / .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'
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'
},
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