Retrieving git submodules without a .git directory

Retrieving git submodules without a .git directory

This comes in handy when you have a copy of a git repository without the .git metadata directory included, for instance a .zip export from Bitbucket. For use in a shell script. if [ ! -d ‘.git’ ]; then git init . # Reconstruct submodules using .gitmodules # Based on https://stackoverflow.com/a/11258810 git config -f .gitmodules […]

Drupal 8 in a subdirectory with nginx

Drupal 8 in a subdirectory with nginx

Assuming this nginx configuration as a starting point: root /var/www/example.org/web; location / {   try_files $uri @rewrite; } location @rewrite {   rewrite ^ /index.php; } You can configure your Drupal 8 instance to run in a subdirectory of the site with two simple steps. In this example we change the instance’s base url from […]

Nginx custom autoindex without FancyIndex

Nginx custom autoindex without FancyIndex

Sending your friends an open directory in your site isn’t fun unless it has random ASCII art under it. :-) Nginx lets one customise the look of open directories using the FancyIndex module. Unfortunately Debian Wheezy doesn’t include this module, unless you get nginx-extras from the wheezy-backports repository. As an alternative, I chose to hack […]

Recursive FLAC to MP3 converter

Recursive FLAC to MP3 converter

I like my music to be in MP3 v0, meaning the data has a variable bitrate of between 200-300 kbit/s. It makes for tiny MP3s that are in my opinion almost indistinguishable from ‘pure’ CD quality, sound-wise. However, to get music in that format is not always possible, so my music directory has become littered […]

Serial connection to the ReadyNAS 102

Serial connection to the ReadyNAS 102

Although not officially documented, it is possible to set up a serial connection to the Netgear ReadyNAS 102. For this, one needs: A USB-to-TTL converter like this one here. Or this one. Make sure the female pins (the individual wires) are separate, unless you find a TTL plug that looks exactly like the ReadyNAS’s port. […]

HOWTO: Unattended rdiff-backup + multiple commands

HOWTO: Unattended rdiff-backup + multiple commands

Here’s a small addition to Dean Gaudet’s tutorial on how to set up rdiff-backup for secure, unattended remote backups. The scenario: you want host1 to pull backups from: host2 : /var/log host2 : /var/www You’ve set everything up: A non-root user on host1 called backupuser which initiates the backup SSH private/public keys for backupuser Added backupuser’s […]