Month: November 2014

Oneliner to generate a Django Secret Key

python -c “import string,random; uni=string.ascii_letters+string.digits+string.punctuation; print repr(”.join([random.SystemRandom().choice(uni) for i in range(random.randint(45,50))]))”

continue reading
No Comments

Debian – Truly Unattended Upgrades

This will make sure you bypass those pesky questions, with the safest option. For when you want to do an upgrade in a script (such as from a Vagrant :shell provision) DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::=”–force-confdef” -o Dpkg::Options::=”–force-confold” dist-upgrade

continue reading
No Comments

Making Byobu Behave

I love byobu (the awesome screen/tmux wrapper). One of my pet peeves with byobu, is it takes over the Function keys (F-keys). There is very little to no documentation on how to disable that by default. Here is how … For Tmux: echo ‘source $BYOBU_PREFIX/share/byobu/keybindings/f-keys.tmux.disable’ >> ~/.byobu/keybindings.tmux For Screen: # Enable Screen if you haven’t,…

continue reading
No Comments