Skip to content

Instantly share code, notes, and snippets.

@maphew
maphew / console-log.txt
Created April 13, 2022 20:04
troubles installing rustc (gcc, libc-dev) on Ubuntu 20.4
#
# part of https://askubuntu.com/questions/1402336/apt-trying-to-fetch-versions-not-available-in-archive-ubuntu-com-ubuntu-pool-mai?noredirect=1#comment2434286_1402336
#
(rio-viz) geoadmin@geonix:~$ sudo mv /var/lib/apt/lists/* apt-temp/
[sudo] password for geoadmin:
(rio-viz) geoadmin@geonix:~$ ls /var/lib/apt/lists
(rio-viz) geoadmin@geonix:~$ sudo apt update
Get:1 https://mirror.it.ubc.ca/ubuntu focal InRelease [265 kB]
Get:2 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]
Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB]
@maphew
maphew / PS-BGInfo.ps1
Created April 27, 2022 20:38 — forked from dieseltravis/PS-BGInfo.ps1
update wallpaper background image with powershell (like Sysinternals BGInfo)
# PS-BGInfo
# Powershell script that updates the background image with a random image from a folder and writes out system info text to it.
# run as a lower priority task
[System.Threading.Thread]::CurrentThread.Priority = 'BelowNormal'
# Configuration:
# Font Family name
$font="Input"
@maphew
maphew / disable-network-thumbdb.reg
Created December 1, 2022 16:47
Fix "can't delete network folder because thumbs.db is open"
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\SOFTWARE\Policies\Microsoft\Windows\Explorer]
"DisableThumbsDBOnNetworkFolders"=dword:00000001
@maphew
maphew / Install-Stork-Windows.md
Last active February 1, 2023 05:20
Recipe to install Stork Search on Windows

Install [Stork-search][0] on Windows

Assumes winget is installed and in PATH. If not go to MS Store and install 'App Installer'.

winget install Microsoft.VisualStudio.2022.BuildTools

Then Start >> Visual Studio installer >> and Select 'Desktop development with C++' kit (req. ~7 GB)

winget install rustup
@maphew
maphew / add-arc-lm-firewall.bat
Last active February 14, 2023 18:25
Allow ArcGIS License Manager through the firewall
@echo off
:: Run this on the LM server machine
setlocal
set _p=C:\ArcGIS\License_Manager\LicenseManager\bin
:inbound
netsh advfirewall firewall add rule name="ArcGIS License Manager - arcgis" dir=in action=allow program="%_p%\arcgis.exe" enable=yes
netsh advfirewall firewall add rule name="ArcGIS License Manager - lmgrd" dir=in action=allow program="%_p%\lmgrd.exe" enable=yes
netsh advfirewall firewall add rule name="ArcGIS License Manager - LSA" dir=in action=allow program="%_p%\LSA.exe" enable=yes
Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_here]
@="@shell32.dll,-8506"
"Icon"="cmd.exe,0"
[HKEY_CLASSES_ROOT\Directory\Background\shell\cmd_here\command]
@="cmd.exe /s /k pushd \"%V\""
[HKEY_CLASSES_ROOT\Directory\shell\cmd_here]
@maphew
maphew / 8-Stitches.md
Last active May 18, 2023 07:00
8 Stitches

"Only the woman is wearing complete protective gear."

An observation my wife makes while we watch the [Bridge Breaking Competition][0]. A dozen engineers mill about, loading metal weights into buckets, and measuring when the popsicle sticks and dental floss contraptions slide, blow and explode into constituent pieces to the oohs and ahs of the delighted and dismayed onlooking crowd of grade school students and families. All of the engineers wear glasses, a few sport steel toed boots, though most have sneakers, and two hard hats are in attendance.

"Oh. That's interesting." says me, and softly led the thought to the background, there being more interesting things to think about. Crack! Crash! and another broken bridge suffers catastrophic ignomy and flies into pieces to the waiting floor and bucket. "Oh wow, that one supported 72kg!"

Applause. We leave. Time passes. Life goes on.

Four hours later I'm sitting in the emergency room clutching a fileted finger and cycling through alternating turns of waiting,

doctorow.medium.com
When the Town Square Shatters - Cory Doctorow - Medium
Cory Doctorow
8 - 10 minutes
Once again, science fiction fandom shows us how to use the internet.
Cory Doctorow
Fanlore
@maphew
maphew / console.log
Last active September 15, 2023 22:57
Attempting to make 'q' to Quit (exit) app to work
Textual Development Console v0.37.0
▌Run a Textual app with textual run --dev my_app.py to connect.
▌Press Ctrl+C to quit.
────────────────────────────────────────────────────────────────────── Client '127.0.0.1' connected ───────────────────────────────────────────────────────────────────────
[15:46:44] SYSTEM app.py:2036
Connected to devtools ( ws://127.0.0.1:8081 )
[15:46:44] SYSTEM app.py:2040
---
[15:46:44] SYSTEM app.py:2042
driver=<class 'textual.drivers.windows_driver.WindowsDriver'>
@maphew
maphew / Install-Leo-code-download.cmd
Last active October 16, 2023 04:43
**Install Leo on Windows Recipe**. Choose among the .cmd for installing from code download, using git, or pypi release. The last one, `Install-Leo`, has all 3 in one file, so don't run as is.
:: Install Leo on windows recipe by matt wilkie
:: Requires App Installer from Microsoft Store be installed first
:: opinionated personal preferences, adjust to suit
::
winget install wget
winget install gsudo
md c:\bin
wget https://raw.githubusercontent.com/chocolatey/choco/blob/master/src/chocolatey.resources/redirects/RefreshEnv.cmd -O c:\bin\RefreshEnv.cmd
sudo setx /M path %path%;c:\bin