A piggy bank of commands, fixes, succinct reviews, some mini articles and technical opinions from a (mostly) Perl developer.

Jump to

Quick reference

Pinto commands, working with pinto and cpm

# Check what's in Pinto CPAN mirror:

pinto list --root $PINTO_MIRROR | grep Your::Module | head -1

# ...or do the same locally (note the space after the module name)

grep 'Smurf::Foo ' ~/.perl-cpm/sources/$DARKPAN/02packages.details.txt

# Downgrade a module using cpm

cpm install --reinstall --no-prebuilt --resolver metadb --resolver 02packages,$DARKPAN_NAME $DARKPAN_FQDN_WITH_BASIC_AUTH/authors/id/U/UB/UBUNTU/Smurf-Foo-1.23.tar.gz


Windows command prompt get set environment variables

Yuck. I feel dirty writing about the Windows command line, but sometimes you just need to get a job done.

View all environment variables

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment"

View a specific environment variable, e.g. PATH

reg query "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" /v PATH

Set an env var locally (not persistent)

set FOO="foo"

Set an env var globally (persistent) - must be run as administrator

setx BAR "bar" /M

View individual local env vars

echo %FOO%

echo %BAR%


What "Wide character in print" means in Perl (hint: UTF8)

 It means there is a glitch in the matrix - agents are coming!

(further reading)

Hack your own MySQL to log in as root

$> sudo service mysql stop

$> mysqld --skip-grant-tables

$> mysql

mysql> FLUSH PRIVILEGES;

mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'root';

mysql> SELECT host, user, plugin FROM mysql.user;

(source)

Note-taking apps for desktop, web and mobile

November 2021

Joplin

Tomboy

  • Tomboy appears very linux-centric, although it has clients for Windows and Mac too.
  • It has an Android app, TomDroid.
  • It has a WebDAV plugin for publishing to the web
  • No web actual app

Evernote

  • Proprietary software
  • Charges actual money
  • Irritating business practices
  • Free version only allows two devices, which isn't enough

Org mode

Colornote

  • Works brilliantly on Android
  • Super fast for short notes
  • No web app

Others