Veghead's Spell Book

Contents

Containment Spells

Run a docker container, without launching the entrypoint

Cloaking Spells

Turn an empty partition into an encrypted LUKS device

This will erase /dev/sdbX. You will be asked to supply a passphrase.

Set a passphrase for your LUKS device volume, and name it "mydrive"

You will be asked to supply the passphrase. The name "mydrive" will be registered with the mapper, and will be available at /dev/mapper/mydrive.

Show information about an encrypted LUKS device

Force every sector to be encrypted, and then format it with ext4

Mount encrypted LUKS volume

Unmount encrypted LUKS volume and secure it

Add subjectAltName (SAN) to home-made certs in OpenSSL.

These days, the Common Name (CN) is not the preferred way of matching certs to websites. Instead, the x509v3 option "Subject Alternative Name" is used. You can force this using the openssl.cfg file. From OpenSSL v1.1.1 you can add it directly on the command line instead. e.g.:

Even if your CN is valid, some browsers (e.g. Chrome) can whinge with a ERR_CERT_COMMON_NAME_INVALID error, if there is no SAN.

Good description here.


Videographical Spells

Extract 40 seconds starting at 4:40 from biglongmovie.avi into clip.avi - recoding as xvid.

On a mac, take a divx and convert to something iMovie likes

Convert divx to DVD style MPEG

Create a DVD image from an MPG

Burn a DVD image in Linux/un*x

Transcode a movie to a Roku-friendly MP4

Extract an MPEG2 from a DVD image quickly


Perls of wisdom

Search and replace a regular expression in a bunch of files, keeping backups


Remedies for nuisance

Prevent tar from including "._" files on MacOS

Prevent the annoying "... can automatically configure your Mac" Device Enrollment pop-up from appearing on Big Sur

Do not be tempted to disable Signed System Volume (SSV) support!

Disable SIP (System Integrity Protection) on MacOS

Disable MacOS's obnoxious "The default interactive shell is now zsh." message


Shellmanship

Find all unique jpegs

Find all unique jpegs in your filesystem (from Seb).

MacOS tar and resource files

Prevent tar from including resource files with "._" (dot underscore) prefixes when creating archives.

MacOS file resource magic

Extract an icon as a resource script

Add a custom icon, stored as a resource script, to an existing file

Hide a file extenstion

MacOS equivalent of strace


Discworlde

Making Hybrid CDs/DVDs on a mac

This will build an ISO image that will appear as a Windows CD on Windows machines and a Mac CD on Macs. We assume the current directory contains all the files you want to burn. In this case the Windows autorun files are hidden from the Mac and the Mac files are hidden from Windows.

Fix DiskUtility

Make DiskUtility stop lying and let you do what you want to do with your own partitions.

Debianicals

SysV service maintenance

Add missing key to APT to fix apt-get update


Spells of the 6th order

Add an address to an interface

Add a /64 subnet to an interface


<< Back

HTML5