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
function mkalias () { | |
if [[ $1 && $2 ]] | |
then | |
echo -e "alias $1=\'$2\'" >> ~/.bash_aliases | |
alias $1=$2 | |
fi | |
} |
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 | |
# 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>" |
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 | |
PORT=$1 | |
if ! [[ "$PORT" =~ ^[0-9]+$ ]] ; | |
then | |
printf "error: '$PORT' is not a number.\n\nUsage killport <port number>\n" | |
exit 1 | |
fi |
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
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 |
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
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 |