Skip to content

Instantly share code, notes, and snippets.

View loranbriggs's full-sized avatar

Loran loranbriggs

View GitHub Profile
@loranbriggs
loranbriggs / mkalias.sh
Created August 3, 2016 19:54
mkalias, a funtion to add to bashrc to create aliases from the command line
function mkalias () {
if [[ $1 && $2 ]]
then
echo -e "alias $1=\'$2\'" >> ~/.bash_aliases
alias $1=$2
fi
}
@loranbriggs
loranbriggs / background_slideshow.sh
Last active March 28, 2016 20:34
creates a background slideshow xml file
#!/bin/bash
# creates a background slideshow xml file
# usage:
#
# background_slideshow.sh >> myfilename.xml
function header() {
echo -e "\t<starttime>"
echo -e "\t\t<year>2009</year>"
#!/bin/bash
PORT=$1
if ! [[ "$PORT" =~ ^[0-9]+$ ]] ;
then
printf "error: '$PORT' is not a number.\n\nUsage killport <port number>\n"
exit 1
fi
@loranbriggs
loranbriggs / install-spotify.bash
Created March 3, 2014 03:14
Install spotify on Linux **Requires Sudo** (Debian, Ubuntu, Linux Mint) Tested on Linux Mint. To run: `sudo bash install-spotify.bash`
sudo echo "deb http://repository.spotify.com stable non-free" >> /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
sudo apt-get update
sudo apt-get install spotify-client
@loranbriggs
loranbriggs / install_mongodb.bash
Created February 12, 2014 18:46
Run this bash script to install mongodb
apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | tee -a /etc/apt/sources.list.d/10gen.list
apt-get -y update
apt-get -y install mongodb-10gen