Today I noticed that the guys over at mpv have changed the build process a bit, so here are updated instructions on how to compile mpv in Debian Wheezy.
A quick walkthrough on how to set up a laptop with a encrypted root filesystem.
/dev/sdc1 - Boot partition
/dev/sdc2 - Root filesystem
The rsync part is just me cloning my current root filesystem, feel free to skip it :)
1 2 3 4 5 6 7 8
Next we need to chroot into the system, update /etc/fstab, /etc/crypttab, reconfigure grub and rebuild the initrd image.
1 2 3 4 5 6 7 8 9 10 11 12 13
A simple bash script looking for large subdirectories in a given directory and removes them:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
In this post I will show how to serve your Puppetmaster with nginx through uWSGI which will give you a Puppetmaster capable of handling many more nodes than when running on Ruby’s builtin webserver. This guide assumes you already have a Puppetmaster to work with.
A short walkthrough on how to get a barebones Puppetmaster and slave set up.
While Ansible is a complete configuration management tool it can also be used for smaller tasks:
- all means we don’t do any particular matching for hosts in the hosts file
- -i specifies in what file we have the list of hosts to connect to
- -k tells ansible we want to enter our SSH password (not use keys)
- -a what command to execute
Which will return for instance:
1 2 3 4 5 6
And if you need to sudo to do something as root just add the -K flag.
Here are two shell scripts to run as cronjobs to clean out old log files or other files/directories.
- First script keep the X most recent logs and deletes the rest
- Second script deletes all logs older than X days
So for some reason you have multiple machines to manage but don’t have SSH-keys on them. It’s still possible to use parallel-ssh and sudo without having to enter any passwords. Create a file with your password in it (suggest you remove the file as soon as you are done). Then install parallel-ssh and sshpass:
Use the programs like this:
tmppass is your password file. For parallel-ssh, -I reads from input and -A asks for password. And for sudo, -S reads the password from stdin.
You might also want to disable StrictHostKeyChecking:
Debian is pretty awesome, but sometimes you want newer versions of software than available in the official repositories. It’s often fairly simple compiling and installing from source code, but what if you want to install the new version on multiple machines? Or just like having a proper .deb package available?
A quick guide on setting up your own signed apt repository with signed .deb packages. This post is a shorter version of the excellent guide at jonliv.es.