This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[snippets]] | |
description = "! - display all files including hidden" | |
command = "ls -a" | |
output = "ls -a" | |
[[snippets]] | |
description = "! - display files" | |
command = "ls" | |
output = "ls -a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################ Z Shell and OH-MY-ZSH ##################### | |
Step 1: Install Updates, Git, and The Z Shell or zsh | |
sudo apt-get update | |
sudo apt-get install zsh | |
sudo apt-get install git-core | |
install zsh | |
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CIDR Conversion Table | |
CIDR Dotted Number of Classfull Networks ---------| | |
prefix Decimal Hexidecimal Inverse | | |
length Netmask Netmask Netmask | | |
Binary | Number of Usable IPs | |
/1 128.0.0.0 80 00 00 00 127.255.255.255 1000 0000 0000 0000 0000 0000 0000 0000 128 As 2,147,483,646 | |
/2 192.0.0.0 C0 00 00 00 63.255.255.255 1100 0000 0000 0000 0000 0000 0000 0000 64 As 1,073,741,822 | |
/3 224.0.0.0 E0 00 00 00 31.255.255.255 1110 0000 0000 0000 0000 0000 0000 000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Decimal - Binary - Octal - Hex – ASCII | |
Conversion Chart | |
Decimal Binary Octal Hex ASCII Decimal Binary Octal Hex ASCII Decimal Binary Octal Hex ASCII | |
Dec Binary Octal Hex ASCII Dec Binary Octal Hex ASCII Dec Binary Octal Hex ASCII Decimal Binary Octal Hex ASCII | |
0 00000000 000 00 NUL 32 00100000 040 20 SP 64 01000000 100 40 @ 96 01100000 140 60 ` | |
1 00000001 001 01 SOH 33 00100001 041 21 ! 65 01000001 101 41 A 97 01100001 141 61 a | |
2 00000010 002 02 STX 34 00100010 042 22 “ 66 01000010 102 42 B 98 01100010 142 62 b | |
3 00000011 003 03 ETX 35 00100011 043 23 # 67 01000011 103 43 C 99 01100011 143 63 c | |
4 00000100 004 04 EOT 36 00100100 044 24 $ 68 01000100 104 44 D 100 01100100 144 6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Firewall with UFW | |
sudo apt-get install ufw -------- Install ufw | |
sudo Vim /etc/default/ufw ------- Edit UFW configuration | |
sudo ufw reset ------------------ reset ufw rules | |
sudo ufw default deny incoming -- To set the defaults | |
sudo ufw default allow outgoing | |
sudo ufw allow https ------------ port 443 -- HTTPS connections, which is what encrypted web servers | |
sudo ufw allow ssh -------------- port 22 -- Configure your server to allow incoming SSH connections | |
sudo ufw allow 22 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Port Numbers --- | |
Description | |
1 TCP Port Service Multiplexer (TCPMUX) | |
5 Remote Job Entry (RJE) | |
7 ECHO | |
18 Message Send Protocol (MSP) | |
20 FTP -- Data -- File Transfer Protocol (FTP): used for uploading and downloading files to and from a server. | |
21 FTP -- Control -- File Transfer Protocol (FTP): used for uploading and downloading files to and from a server. | |
22 SSH Remote Login Protocol **** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH | |
ifconfig --------------------------------------------------------------------- Find Address | |
sudo apt-get install openssh-server -------------------------------------------- Install the openssh-server package | |
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.factory-defaults ------------- Make a copy of the default SSH configura=on | |
and rename it as factory default | |
mkdir /home/username/.ssh ------------------------------------------------------ Created a for generated key will live | |
mkdir ~/.ssh ------------------------------------------------------------------- Create a directory for generated key will live | |
sudo chmod a-w /etc/ssh/sshd_config.factory-defaults --------------------------- modify its permissions chmod 700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## -- Initializing a new git repository | |
$$ git init | |
## -- Useful git log commands | |
$$ git log --oneline ## print short sha in one line | |
$$ git log -3 ## show only first 3 commit | |
$$ git log --author="John" ## show commits only by this author | |
## -- Cloning a git repository |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Running tmux | |
tmux can be run from within an terminal window by typing tmux | |
#Commands | |
tmux commands are introduced by hitting <CTRL>+b followed by the command. | |
# Sessions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################### | |
# Name: Bash CheatSheet for Mac OSX | |
##################################################### | |
# 0. Shortcuts. | |
CTRL+A # move to beginning of line |
OlderNewer