Skip to content

Instantly share code, notes, and snippets.

View EldonMcGuinness's full-sized avatar

Eldon McGuinness EldonMcGuinness

View GitHub Profile
### Keybase proof
I hereby claim:
* I am eldonmcguinness on github.
* I am eldonmcguinness (https://keybase.io/eldonmcguinness) on keybase.
* I have a public key ASBWBwMsv0MZRhwMxx0t7D340FhllyAn6PkgaxWxq31DKwo
To claim this, I am signing this object:
@EldonMcGuinness
EldonMcGuinness / gist:7d65e26705315c7b2c95df52c06e4b2d
Created February 13, 2018 04:45
KDE Turn Off Monitors When Locking Screen
In System Settings -> Notifications -> Screen Saver -> Screen Locked, add the following command.
/bin/sleep 3 && /usr/bin/xset dpms force standby
@EldonMcGuinness
EldonMcGuinness / epub2mobi
Created February 10, 2018 23:09
Convert epub to mobi using calibre, see included note for bulk converting
#!/bin/bash
FILE=$(basename "$1" .epub)
if [ -e "${FILE}.mobi" ]; then
echo nothing to do
else
echo converting
ebook-convert "${FILE}.epub" "${FILE}.mobi"
fi
@EldonMcGuinness
EldonMcGuinness / openpgp.txt
Created January 12, 2018 04:35
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:473be7a8a6255fef1a8ccf27302f0e72ccb6f5ff]
var jq = document.createElement('script');
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
function strip(str) {
return str.replace(/^\s+|\s+$/g, '');
}
var json = {};
var productArray = Array();
@EldonMcGuinness
EldonMcGuinness / tar-upload
Last active June 7, 2017 19:52
Tar and Upload
#!/bin/bash
SOURCE=
DEST=
RSA_KEY=
usage() {
cat << EOF
usage: $0 options
@EldonMcGuinness
EldonMcGuinness / numGenerator.py
Created January 1, 2017 20:03
A short script to generate permutations based on a rance of numbers.
#!/usr/bin/python2.7
import sys, getopt, itertools
def help():
print('test.py -r <range> -l <length> -o <outputfile> -c <count>')
def main(argv):
genRange = None
#!/bin/sh
for i in *.cb*; do
echo $i
mkdir -p temp rebuilt
case "$i" in
*.cbr)
unrar e -o+ "$i" temp
;;
@EldonMcGuinness
EldonMcGuinness / social-media-colours.css
Created September 19, 2015 03:13
Social Media Colours CSS
twitter: #00aced rgb(0, 172, 237)
facebook: #3b5998 rgb(59, 89, 152)
googleplus: #dd4b39 rgb(221, 75, 57)
pinterest: #cb2027 rgb(203, 32, 39)
linkedin: #007bb6 rgb(0, 123, 182)
youtube: #bb0000 rgb(187, 0, 0)
vimeo: #aad450 rgb(170, 212, 80)
tumblr: #32506d rgb(50, 80, 109)
instagram: #517fa4 rgb(81, 127, 164)
flickr: #ff0084 rgb(255, 0, 132)
@EldonMcGuinness
EldonMcGuinness / KodiBackup.sh
Created August 23, 2015 02:57
KODI Cloning Script
### This should be run from /sdcard/Android/data/org.xbmc.kodi/files
tar cvzf /usbdisk/kodi_backup.tar.gz --exclude=.kodi/userdata/Database/Textures13.db --exclude=.kodi/userdata/Thumbnails --exclude=.kodi/temp .kodi