Stupid Admin Tricks

This is a general linux administration blog where I share some of the many tricks I've picked up along the way. Some of these will include some in-depth how-tos.

I generally use mosh since it can be forgiving of slow and interruptable links, but I also go one step further and install byobu (its a layer on top of tmux/screen, tmux is default). It will save your session from a network drop!

In your non-root .vimrc

cmap w!! w !sudo tee "%" >/dev/null

If :w! fails because you forgot to su/sudo, just use :w!!

If you use a content management system for your site, it probably already deals with mobile systems. But, what if you have parts of your site that aren't in a CMS, or you do your site by hand? Media queries are best, but sometimes you just need to serve a different file to mobile with the least hassle.