C-NET :: PROJECTS

ls -t projects/ | grep -i "Howto's"

Howto's

2025

Posting table data to a web API using PowerQuery in Excel

How to send Excel table data to a web API from PowerQuery by building a CSV payload and forcing Excel to make the request.

Howto's · Windows · Solved Problems · Software

2021

DNS names for VirtualBox client machines

A PowerShell script that adds the IP addresses of running VirtualBox guests to the Windows hosts file, and autostarts chosen VMs headless.

Howto's · Linux · Windows · Reference · Solved Problems
DNS names for Hyper-V client machines

A PowerShell script that keeps the Windows hosts file updated with the IP addresses of running Hyper-V virtual machines.

Howto's · Linux · Windows · Solved Problems
Finding and killing stuck or mistyped postgresql queries

PostgreSQL queries to list, cancel and terminate running or stuck queries.

Howto's · Reference · Software

2019

Docker starts slowly on Raspberry Pi / Raspbian

How to fix Docker taking minutes to start on a Raspberry Pi running Raspbian, caused by a lack of random entropy, by installing haveged.

Howto's · Linux · Solved Problems

2018

Recovering versioned files from Owncloud's data directory

How to find versioned files in ownCloud's data directory and copy them out with readable timestamped names.

Howto's · Linux · Solved Problems
Script for creating a compressed image file from a Raspbian SD card

A script that shrinks a Raspbian SD card, zero-fills its free space and saves it as a compressed image file.

Howto's · Linux · Solved Problems
Using external Certificate Authority certificates in a restricted or closed environment

How to find the CRL and OCSP URLs of a public CA certificate and open the pinholes a closed network needs to verify it, on Linux and Windows.

Howto's · Windows
Shrinking a Windows 10 installation for small harddrives

How to save disk space on small Windows 10 devices by compressing the operating system files with compact.exe /CompactOS.

Howto's · Windows · Solved Problems

2017

Sleeping without a subprocess in Bash, and how to sleep forever

A Bash function that sleeps, or sleeps forever, with the read builtin on a process substitution instead of running the external sleep command.

Howto's · Linux · Solved Problems
Shrinking a Raspbian installation and re-enabling auto expanding for distribution of customized images

How to shrink a customized Raspbian SD card into a small image file that expands again on first boot.

Howto's · Linux · Solved Problems
Handling multiple overlapping VPN client networks with pfSense and a reflector VM

How to reach VPN client networks that overlap your own or each other with pfSense, outbound NAT and a Shorewall reflector VM.

Howto's · Linux · Solved Problems
Making a minimal VPN routing virtual machine to isolate obnoxious VPN clients

How to build a small Debian VM with OpenConnect and Shorewall that routes traffic to a client VPN, kept apart from pfSense.

Howto's · Linux · Solved Problems
BashDB, a single dynamic database table for bash scripts

BashDB, a Bash library that stores a single key and value table with dynamic columns and lists, to keep persistent state in shell scripts.

Howto's · Linux · Solved Problems
Figuring out which session is blocking a query on Microsoft SQL Server (query suspended)

A SQL Server query that shows which session is blocking which, to find the cause of suspended queries and lock waits.

Howto's · Windows · Reference · Solved Problems
Finding duplicate files with Bash

cdupes, a Bash script that finds duplicate files by size and checksum with find and a few pipes, much like fdupes.

Howto's · Linux · Solved Problems
Installing Windows XP on the Fujitsu Siemens Esprimo u9200 in 2017

How to install Windows XP on the Fujitsu Siemens Esprimo u9200 with slipstreamed SATA drivers, plus drivers, tweaks and tools.

Howto's · Windows
Import email from existing POP3 account to Gmail in 2017

Step-by-step screenshots for importing mail from an existing POP3 account into Gmail and sending as that address.

Howto's

2016

Setting all SQL Server databases to "simple" recovery model and deleting all the transaction logs

A T-SQL script that sets every user database on SQL Server to the simple recovery model and shrinks its transaction log, also for odd database names.

Howto's · Windows
Debugging SQL Server Query Performance

How to measure SQL Server query time and IO, and how to clear the caches for a clean test.

Howto's · Windows · Software
Force SQL Server Database offline

How to force a SQL Server database offline when active sessions block it, and how to bring it back online.

Howto's · Windows
Automatic Windows Logon on Domain Member Machines

How to enable automatic Windows logon on a domain member machine by setting the WinLogon registry values.

Howto's · Windows · Solved Problems
Shrinking the MS SQL Server "tempdb" (when it won't shrink)

How to shrink the MS SQL Server tempdb database when it refuses to shrink, by freeing the caches first.

Howto's · Windows · Solved Problems
Fixing empty search results in the Windows 10 Settings (the shiny new Control Panel)

How to fix empty search results in the Windows 10 Settings app by toggling content indexing on its LocalState Indexed folder.

Howto's · Windows · Solved Problems
SPF exists for a reason, and postfix makes it ridiculously easy

What SPF does and does not do for email, with a pointer to a guide for enabling SPF checks in Postfix on Debian and Ubuntu.

Howto's · Linux
pfSense as a Cisco AnyConnect VPN Client using OpenConnect

How to install OpenConnect on pfSense, keep a Cisco AnyConnect VPN connection up from cron and add its interface to the GUI.

Howto's · Linux · Solved Problems

2015

How to use a gateway outside of the local subnet on Linux

How to route all traffic on Debian through a gateway with a private IP outside the local public subnet.

Howto's · Linux · Solved Problems
MSSQL Mass Delete

How to delete large amounts of data from a SQL Server table in small chunks with DELETE TOP.

Howto's · Windows · Reference · Solved Problems
Restarting a VPN client on pfSense through the CLI (SSH)

How to restart an OpenVPN client on pfSense from another machine over SSH with a small script, for a flaky VPN connection.

Howto's · Linux · Solved Problems

2014

Moving Windows' Offline File Cache away from C:\

How to move the Windows Offline Files cache (C:\Windows\CSC) to another drive with a directory junction.

Howto's · Windows
Make exim4 on Debian respect .forward and /etc/aliases when using a smarthost

How to make exim4 on Debian apply /etc/aliases and ~/.forward to outgoing mail when it sends through a smarthost.

Howto's · Linux · Solved Problems
Reverse SSHFS mounts (fs push)

How to mount a file system on a remote machine with sshfs, started from the machine that holds the files, using dpipe and sshfs slave mode.

Howto's · Linux · Solved Problems

2013

Creating persistent SSH tunnels in Windows using autossh

How to run autossh from Cygwin as a Windows service, to keep an SSH tunnel up with key authentication.

Howto's · Windows
Running PulseAudio in system mode with TCP listening on Debian Wheezy

How to run PulseAudio in system mode on Debian Wheezy with a TCP listener for remote sound over an SSH tunnel.

Howto's · Linux
One-time passwords in Debian Wheezy with libpam-otpw

How to set up one-time password SSH logins on Debian Wheezy with libpam-otpw.

Howto's · Linux

2012

CD-ROM Raspberry Pi case

How an old SCSI CD-ROM drive became a case for a Raspberry Pi, with working front buttons, LEDs, audio and GPIO on the back.

Howto's
Using CheckInstall to track custom source downloads on Debian

How to use CheckInstall to make Debian packages from source installs, so they can be removed with dpkg.

Howto's · Linux
Pausing and continuing a process on Linux

How to pause and resume a running process on Linux with the STOP and CONT signals.

Howto's · Linux

2011

bash time limit on commands

How to put a time limit on a command using only the shell, with a script based on the pixelbeat.org timeout script.

Howto's · Linux · Solved Problems
Debian and Ubuntu auto-login and Xorg without a display manager

How to log in automatically on a spare TTY with rungetty and start Xorg from .bash_login on Debian and Ubuntu, without a display manager.

Howto's · Linux
Remote desktop does not support colour depth 24; falling back to 16

How to enable 24-bit colour for RDP connections to Windows XP through Group Policy, so rdesktop stops falling back to 16-bit.

Howto's · Windows · Solved Problems

2010

OTP (one-time passwords) on Debian Squeeze SSH logins

How to require OPIE one-time passwords for SSH logins on Debian Squeeze with libpam-opie and challenge-response authentication.

Howto's · Linux
Windows XP activation doesn't pop up after repair or ghost

How to get into Windows XP when activation will not start after a repair or ghosting, and fix it with a hotfix and Internet Explorer 8.

Howto's · Windows · Solved Problems
Avoiding invalid commands in Bash history

How to keep mistyped, not-found commands (exit status 127) out of your Bash history with a PROMPT_COMMAND function.

Howto's · Linux

2009

Improve the mouse response and acceleration in Debian

How to patch and rebuild xserver-xorg-core on Debian Lenny for the improved mouse acceleration from Simon Thum's patch.

Howto's · Linux
Enlightened XFCE4

A howto stolen from http://ubuntuforums.org/showthread.php?t=101066 for later use. All credit to its writer, Iandefor.

Howto's · Linux

2008

ssh: how to permit root login only from local network / ip

From version 4.3p2, sshd supports an interesting option called Match. At the time of writing, this is the version supplied with Debian Etch (stable).

Howto's
Encrypted swap in Debian

How to encrypt swap in Debian with 256-bit AES and a random key generated at each boot, using cryptsetup and crypttab.

Howto's
irssi auto-connect and auto-identify

How to make irssi connect, identify and join channels automatically with its built-in commands, without scripts.

Howto's
Disable the "No mail" notification on machines which have no local mail

How to stop the "No mail." message at login on machines that send all mail to a smarthost, by editing the pam_mail line in PAM.

Howto's · Linux
Disable Debian's motd on login

How to stop Debian from showing the message of the day on login by emptying /etc/motd and disabling its regeneration at boot.

Howto's · Linux
How to reset the root password on a Debian machine

How to reset a lost root password on Debian from a live CD or by booting with init=/bin/bash from the GRUB menu.

Howto's · Linux
Where to rename network interfaces in debian etch

Has your desired eth0 ended up as eth1 and the other way around? Did you put in a new network card, having every config file set to use eth0, and the card shows up as eth1?

Howto's · Linux