This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -euo pipefail | |
function main() { | |
# Check for argument | |
if [ $# -ne 1 ] | |
then | |
echo "usage: $0 INFILE" | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error | |
# Make sure that the .gnupg directory and its contents is accessibile by your user. | |
chown -R $(whoami) ~/.gnupg/ | |
# Also correct the permissions and access rights on the directory | |
chmod 600 ~/.gnupg/* | |
chmod 700 ~/.gnupg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git cheat sheet | |
setup | |
git help - will provide instructions | |
git config —global user.name “David Conner” - set the global user name | |
git config —global user.email [email protected] - set the global email | |
git config —global color.ui true - turns on a colorful ui for the command line |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget http://support.webex.com/supportutilities/nbr2mp4.tar | |
tar -xvf nbr2mp4.tar ./ | |
bash ./nbr2mp4.sh | |
cd nbr2_mp4/ | |
# find missing libraries | |
ldd nbr_play | grep not | |
# install 32bit versions | |
sudo apt-get install libpangox-1.0-0:i386 libpangoxft-1.0-0:i386 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##### | |
## Open iTerm2 tab from Finder | |
## | |
## Adapted from these sources: | |
## http://peterdowns.com/posts/open-iterm-finder-service.html | |
## https://gist.github.com/cowboy/905546 | |
## Modified to work with files as well, cd-ing to their container folder | |
## | |
## Usage Instructions: | |
## 1) Open Automator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cd /home/username/public_html/data/pages/ | |
git pull | |
git add -A | |
git commit -m "Dokuwiki external edit" | |
git push origin master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
## Email Variables | |
EMAILDATE=`date --date="today" +%y-%m-%d` | |
EMAIL="[email protected]" | |
SUBJECT="[servername] Backup Script Started! - "$EMAILDATE | |
EMAILMESSAGE="/tmp/emailmessage1.txt" | |
echo "Just to let you know that the backup script has started."> $EMAILMESSAGE | |
/bin/mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
NewerOlder