Skip to content

Instantly share code, notes, and snippets.

@BobCHub
BobCHub / Ubuntu.txt
Created April 16, 2018 00:07
Install Ubuntu Server
1) Install Hyper-V (DON”T NEED THIS)
Go to the Windows icon and start the Server Manager
Click on Manage > Add Roles and Features
Click on Next repeatedly, until you get to the Select server roles screen
Select Hyper-V and click Next
When prompted to add additional required features, click on Add Features
Click on Add Features
Click Next
Under Remote Server Administration Tools > Role Administration Tools, select Hyper-V
Management Tools (if not already selected) and click on Next
@BobCHub
BobCHub / fzf.txt
Created February 17, 2018 18:12
FZF Fuzzy completion
FZF Fuzzy completion
Key bindings for command line
CTRL-T ----------------------------------------- Paste the selected files and directories onto the command line
CTRL-R ----------------------------------------- Paste the selected command from history onto the command line
ALT-C ------------------------------------------ cd into the selected directory
Files and directories
@BobCHub
BobCHub / Vim_reference.txt
Created February 17, 2018 17:48
Vim_reference
#Cursor movement
h - move left
j - move down
k - move up
l - move right
ctrl-b - page up
ctrl-f - page down
% - jump to matching brace
w - jump by start of words (punctuation considered words)
@BobCHub
BobCHub / NERDTree.txt
Last active May 22, 2018 09:04
NERDTree Reference
# NERDTree
Switch between Vim and Nerd Tree
Ctrl+ww --------------------------------- cycle though all windows
Ctrl+w and then right arrow ------------- cycle though all windows
Ctrl+w and then left arrow ------------- cycle though all windows
Ctrl+wh ------- takes you left a window
Ctrl+wj ------- takes you down a window
Ctrl+wk ------- takes you up a window
Ctrl+wl ------- takes you right a window

Vim Cheat Sheet

Global

  • :help keyword - open help for keyword
  • :o file - open file
  • :saveas file - save file as
  • :close - close current pane

Cursor movement

@BobCHub
BobCHub / Bash_Reference2.txt
Created February 17, 2018 17:40
Bash_Reference2
/**<<<<<<<<< Bash scripting cheatsheet >>>>>>>>**/
/*********** Basic Example ************/
// A simple copy script
#!/bin/bash
cp $1 $2
@BobCHub
BobCHub / Bash_Reference1.txt
Created February 17, 2018 17:39
Bash_Reference1
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#####################################################
# 0. Shortcuts.
CTRL+A # move to beginning of line
@BobCHub
BobCHub / TMUX.txt
Created February 17, 2018 17:37
TMUX Reference
#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
@BobCHub
BobCHub / Github reference.txt
Last active February 17, 2018 17:13
Github reference
## -- 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
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