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 | |
function usage() { | |
echo "USAGE: batchrename.sh <query> <replacement> [shouldMove]" | |
echo -e "\n\ | |
Rename a batch of files. The first parameter (query) should be a\n\ | |
string common to all the filenames in the batch. The second\n\ | |
parameter (replacement) should be a string that replaces the\n\ | |
query in the new filenames. The third parameter indicates whether\n\ | |
it should copy or move the files. It defaults to false.\n\ |
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 | |
# I actually just added this as a function in my .bashrc, but you | |
# could just "chmod +x" this script and drop it in a bin folder in | |
# a local $PATH directory such as "/usr/local/bin" | |
# Requires pandoc be installed. https://pandoc.org/ | |
# Might also require latex to be installed, but I'm not sure about that one. | |
mdBase=`basename -s ".md" "${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 | |
# Asynchronously gets the Verse of the Day from OurManna.com and prints it to the terminal | |
# Must have httpie installed for it to work! (Visit https://httpie.org/) | |
function printVotd { | |
# Uses the REST API to get the verse of the day, discarding any errors | |
votd=`http --print=b http://www.ourmanna.com/verses/api/get/?format=text 2>/dev/null` | |
# Colorize and print the verse to the terminal | |
printf "\n\n\033[01;34m${votd/ - /\\n\\n}\n\n" |
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 | |
# Openconnect command-line script for connecting to ISU's VPN servers | |
# from Debian-Ubuntu-derived Linux distro's. More info at | |
# http://www.socsci.uci.edu/~jstern/uci_vpn_ubuntu/ubuntu-openconnect-uci-instructions.html | |
# (because I originally got it from UCI) | |
# | |
# This script adapted from David Schneider's great page on github at | |
# https://github.com/dnschneid/crouton/wiki/Using-Cisco-AnyConnect-VPN-with-openconnect | |
# and with help from OIT's Linux OpenConnect instructions at |
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 | |
# 16:9 ratio suggestion | |
$max_width=768 | |
$max_height=432 | |
# 4:3 | |
# $max_width=640 | |
# $max_height=480 |
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
DIR=$(mktemp -d) | |
git clone https://github.com/KrashLeviathan/NathanKarasch.git $DIR | |
jekyll build --source "$DIR" --destination /home/nkarasch/site | |
rm -rf $DIR |
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
# Got this handy tidbit from Jeffrey Way on tutsplus.com | |
# http://code.tutsplus.com/tutorials/quick-tip-how-to-work-with-github-and-multiple-accounts--net-22574 | |
# This file goes in your $HOME/.ssh directory | |
# Default GitHub account (work or school) | |
Host github.com | |
HostName github.com | |
User git | |
IdentityFile ~/.ssh/id_rsa |
NewerOlder