Skip to content

Instantly share code, notes, and snippets.

@mohammadne
mohammadne / books.md
Last active April 22, 2024 16:02
this gist contains my academic and favorite books

Books

this gist contains my academic and favorite books

Software Engineering

Architecture

  • Microservice Patterns (manning)
  • Clean Architecture (uncle bob)
@hamidne
hamidne / robbyrussell.bash-theme
Last active February 3, 2024 20:35
bash robbyrussell theme
function git_exist_fist() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
echo "git:("
else
echo ""
fi
}
  1. git rm -r --cached .
  2. git add .
  3. git commit -m ".gitignore is now working"

Generate SSH Key

ssh-keygen -t rsa -C "your.email@example.com" -b 4096

Copy SSH Key and Use them

macOS:

pbcopy < ~/.ssh/id_rsa.pub

GNU/Linux (requires the xclip package):

How to Open/Extract a RAR File in Linux

unrar x file.rar

How to List a RAR File in Linux

unrar l tecmint.rar

How to Create Rar File in Linux

rar a tecmint.rar tecmint

How to Recover Archives

@hamidne
hamidne / import_db.md
Created September 16, 2019 02:26
import Data Base with SSH

import Data Base with SSH

scp ~/Downloads/Orders.sql root@MY_SSH_IP:/root/Orders.sql
ssh root@MY_SSH_IP
mysql -u root -p myshop < Orders.sql
@hamidne
hamidne / install_redis.md
Created September 16, 2019 02:25
Install Redis Centos 7

Install Redis on server Source

sudo yum install epel-release
sudo yum --enablerepo=remi install redis

Start Redis

sudo systemctl enable redis
sudo systemctl start redis
@hamidne
hamidne / 1. install_dependencies.md
Last active January 6, 2021 17:21
Install LEMP in centos 7

Install Dependencies

sudo yum install -y epel-release
sudo yum install -y http://rpms.remirepo.net/enterprise/remi-release-7.rpm
sudo yum install -y yum-utils

sudo yum groupinstall -y 'Development Tools'
sudo yum install -y pcre perl pcre-devel zlib zlib-devel openssl openssl-devel
@Peregrinox
Peregrinox / unrar osmc stretch.md
Last active June 18, 2021 06:11
install unrar non-free on osmc (debian stretch)

Add contrib non free to sources:

$ sudo nano /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stretch main contrib non-free

deb http://security.debian.org/debian-security stretch/updates main contrib non-free

@nepsilon
nepsilon / bash-zsh-useful-aliases.md
Last active December 25, 2021 08:20
Useful aliases for bash and zsh — First published in fullweb.io issue #17

Useful aliases for bash and zsh

Using aliases to give commands useful options by default is a good way to boost productivity.

Here are 5 aliases to put in your ~/.bashrc or ~/.zshrc to keep them permanently:

1. ls:

# ls: adding colors, verbose listign
# and humanize the file sizes: