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 / 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
for f in *; do mv "$f" "`echo $f | tr "[:upper:]" "[:lower:]"`"; done
brew install youtube-dl
brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-frei0r --with-libass --with-libvo-aacenc --with-libvorbis --with-libvpx --with-opencore-amr --with-openjpeg --with-opus --with-rtmpdump --with-schroedinger --with-speex --with-theora --with-tools
#or...
#--with-faac
#but replaced with fdk-aac for licensing reasons
@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
var path = require('path'),
config;
config = {
// ### Production
// When running Ghost in the wild, use the production environment
// Configure your URL and mail settings here
production: {
url: 'http://my-ghost-blog.com',
mail: {
sudo apt install libxinerama-dev libx11-dev libxft-dev
sudo make clean install
@rkennesson
rkennesson / script.sh
Created July 11, 2016 09:18
run command on each line of file
while read word; do git clone $word; done < infile.txt
#use github token to delete text file of repos
#each line in username/repo format
while read repo; do curl -X DELETE -H "Authorization: token 40_character_token" "https://api.github.com/repos/$repo"; done < repos.txt
@rkennesson
rkennesson / folderbackup.sh
Last active January 27, 2018 04:21
rsync usage
#--delete allows for files to be deleted
#--dry-run goes through the process but doesn't actually do anything
rsync -h -v -r -P -t --delete --exclude='.DS_Store' --exclude='._*' ~/Documents/classes/ENGIN112/ /Volumes/Lexar/college/Subjects/Engineering/ENGIN112/
rsync -h -v -r -P -t --delete --exclude='.DS_Store' --exclude='._*' ~/Documents/classes/PHYS151/ /Volumes/Lexar/college/Subjects/Physics/Classes/PHYS151/
rsync -h -v -r -P -t --delete --exclude='.DS_Store' --exclude='._*' ~/Documents/classes/MATH131/ /Volumes/Lexar/college/Subjects/Mathematics/Classes/MATH131/
#-----
@rkennesson
rkennesson / delete-repo-list
Last active August 8, 2016 00:30
git usage
#repo.txt in form of username/repo
#one repo per line
while read repo; do curl -X DELETE -H "Authorization: token 67868765a6ls88hlklkjgljfalsd" "https://api.github.com/repos/$repo"; done < repos.txt
@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: