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 / .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?
#!/bin/bash
COUNT=0
while true; do
curl http://transmitter.ieee.org/makerproject/vote?code=9c968
COUNT=$((COUNT + 1))
echo $COUNT
done
#!/bin/bash
@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 / 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 / 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 / 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] ...

#src:https://www.reddit.com/r/selfhosted/comments/5cpxbu/selfhosted_github/d9ym4v6/
#You actually don't need a software package like github or gitlab to host your own
#repositories, if the command line is good enough for you, all you need is git itself
#and a remote machine that you can ssh into.
#remote host
git init --bare
#on the local machine
git init
#remote location with
@rkennesson
rkennesson / move.sh
Created December 25, 2016 18:56
Move to new directory
# *files* = expression for files to move
# $_ bash internal for argument to previous command, in this case the directory "New Directory"
mkdir "New Directory" && mv *files* "$_"
@rkennesson
rkennesson / hyperfido.txt
Created March 19, 2017 05:08
Hyperfido instructions
HyperFido - FIDO U2F Security Key
By Jonathan Williams
https://www.amazon.com/review/R1MX4254RVC97T/ref=cm_cr_dp_cmt?ie=UTF8&ASIN=B00WIX4JMC&channel=detail-glance&nodeID=541966&store=pc#wasThisHelpful
This HyperFIDO U2F key is small enough to keep in your pocket or purse at all times and never worry about it. It worked great after getting a fast reply from HyperSECU support about the linux udev rules needed (I don't use windows). I had it set up very quickly with Google services and it worked flawlessly. Hopefully, more services will support U2F in the future.
If you are wondering, here are the udev rules their awesome support recommended. I created a file /etc/udev/rules.d/96-hyperfido.rules and used the first example below because thankfully, I do not have to deal with systemd. If you are unfortunate enough to have to use systemd, please use the second example.
Example 1