Skip to content

Instantly share code, notes, and snippets.

View rkennesson's full-sized avatar
:octocat:
I may be slow to respond.

Richard Kennesson rkennesson

:octocat:
I may be slow to respond.
View GitHub Profile
@rkennesson
rkennesson / README.md
Created May 23, 2017 07:26 — forked from hofmannsven/README.md
My simply Raspberry Pi Cheatsheet
@rkennesson
rkennesson / vim-cheatsheet.md
Created November 6, 2016 18:32 — forked from azadkuh/vim-cheatsheet.md
vim / vimdiff cheatsheet - essential commands

Vim cheat sheet

Starting Vim

vim [file1] [file2] ...

@rkennesson
rkennesson / tar_commands.sh
Last active May 19, 2017 17:36 — forked from seanbuscay/tar_commands.sh
Tar commands
; Create a Tar of All in Directory
tar cvf backup.tar . 
; Untar
 tar xvf filename.tar
; Exclude files
@rkennesson
rkennesson / if_file_exists.sh
Created November 6, 2016 17:00 — forked from seanbuscay/if_file_exists.sh
Check if file existsd
#!/bin/bash
FILE=$1
 
if [ -f $FILE ];
then
echo "File $FILE exists"
else
echo "File $FILE does not exists"
fi
@rkennesson
rkennesson / git_create_orphan.sh
Created November 6, 2016 16:58 — forked from seanbuscay/git_create_orphan.sh
Create an orphan branch in a repo.
cd repository
git checkout --orphan orphan_name
git rm -rf .
rm '.gitignore'
echo "#Title of Readme" > README.md
git add README.md
git commit -a -m "Initial Commit"
git push origin orphan_name
@rkennesson
rkennesson / .profile
Created October 24, 2016 23:56 — forked from unixmonkey/.profile
.profile - shortcuts and bash settings
# *****************************************
# .profile
#
# Includes lots of nice funtions
# and aliases to make your command-line
# experience happy and productive
#
# *****************************************
# Me and you; we have history, you know?
@rkennesson
rkennesson / sublime_setup.md
Created August 27, 2016 19:03 — forked from barnes7td/sublime_setup.md
Sublime Terminal Setup

Setup Terminal for Sublime Shorcut "subl":

Open terminal and type:

1. Create a directory at ~/bin:

mkdir ~/bin

2. Copy sublime executable to your ~/bin directory:

@rkennesson
rkennesson / terminal.md
Last active March 5, 2016 20:24 — forked from ryansechrest/terminal.md
Shortcuts for Mac terminal.

Mac Shortcut Guide

##Symbol Legend

Symbol Abbreviation Name
Opt Option
^ Ctrl Control
Cmd Command
Shift Shift
@rkennesson
rkennesson / slack.conf
Created December 22, 2015 05:57 — forked from Nihisil/jail.local
Send notifications to the Slack from fail2ban
[Definition]
actioncheck=
actionstart =
actionstop =
actionban = /bin/bash /etc/fail2ban/slack_notify.sh "Banned _country_ <ip> in the jail <name> after <failures> attempts" "<ip>" > /dev/null 2>&1
actionunban = /bin/bash /etc/fail2ban/slack_notify.sh "Unbanned _country_ <ip> in the jail <name>" "<ip>" > /dev/null 2>&1