Aliases
So right now I’m not sure whether to post whenever I think of an alias or bashrc function or to collect them all here. For now, I’ll just add to this post as I think of them. While not technically aliases, I’ll mostly include functions that I’ve placed in bashrc because to me, they serve the same purpose: they fulfill a certain requirement with less typing.
Backup File
Renames file argument to
function bk() {
cp $1 $1.tmp
mv $1 $1.bk
mv $1.tmp $1
}
Deploy Octopress Site Changes
This one is used to deploy any changes to my site. After creating a post or changing the html/css, I just have to type in “deploy ‘<git commit message’” and itwill publish the changes. It first generates the site and then deploys it. The next half adds all changed files, adds a commit message, and pushes to my github. The hardest part is just remembering to add that commit argument.
function deploy() {
rake generate;
rake deploy;
git add .;
git commit -m $1;
git push origin source;
}
Aliases
View any usb drives that were plugged in. The later they appear, the later they were plugged in or registered.
alias vdev='dmesg | grep -o "sd[a-z]" | uniq | tail'