Use USB drive as apt-get cache for frequent Raspberry PI reinstalls

I work on a configuration script for a Raspberry Pi, and as I debug it, more often than not I need to run reinstall over and over. On a metered connection it may be a problem, as not only it’s slow, it also uses your data plan. A way around this would be having a… Continue reading Use USB drive as apt-get cache for frequent Raspberry PI reinstalls

Connecting to Github from Debian Jessie in 2024

Upgrade everything that still upgrades. Add these to your /etc/apt/sources.list: deb [trusted=yes] http://archive.debian.org/debian jessie main deb [trusted=yes] http://archive.debian.org/debian-security jessie/updates main Optionally, you can comment out the old entries you may already have there. Run apt-get update && apt-get upgrade Chances are, if you try to connect with what you got, Github will complain: ERROR: You’re… Continue reading Connecting to Github from Debian Jessie in 2024

Tar complaining about “You must specify one of the options”

If you’re trying to create a backup using tar but you’re getting this error tar: You must specify one of the ‘-Acdtrux’, ‘–delete’ or ‘–test-label’ options Try ‘tar –help’ or ‘tar –usage’ for more information. … check your options order. In my case, I was using –exclude. It turns out, if the paths you provide… Continue reading Tar complaining about “You must specify one of the options”

nvm, npm, node: Command not found

The problem I had gatsbyjs, node and npm installed on a Debian system. Now I’m getting this error: -bash: gatsby: command not found -bash: node: command not found -bash: npm: command not found Troubleshooting Check npm installation using the package manager: apt-cache policy npm npm: Installed: (none) Check nvm installation: nvm –version 0.39.3 This means… Continue reading nvm, npm, node: Command not found

Migrate whole VPS to another server using rsync

Say you’re about to cancel a VPS, but first you need to copy its contents (source) over to another server (destination). We will be using rsync. Note: rsync will keep the original timestamps for both files and folders, so that’s good. General idea: rsync –params source destination Because we will copy the whole source VPS,… Continue reading Migrate whole VPS to another server using rsync

Add nvm-managed node to $PATH in init.d or crontab

When I was using node installed via apt-get, a simple NODE=$(which node) was enough. However, once I switched to the nvm-based node, it was no longer installed in one of the $PATH locations where the system is looking. So the correct path had to be added manually. One option is to hardcode whatever the current… Continue reading Add nvm-managed node to $PATH in init.d or crontab