Skip to content

Instantly share code, notes, and snippets.

@jeremy-jameson
jeremy-jameson / .gitconfig
Last active January 23, 2026 18:43
Git configuration for Windows
[user]
email = jjameson@duck.com
name = Jeremy Jameson
signingkey = key::ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIFa2FTf+AbGUiLakkwtAbxOCMLF2Tc8Fnuw/EWxxs5go jjameson+2025-05@technologytoolbox.com
[color]
ui = true
[core]
editor = 'C:\\Program Files\\Microsoft VS Code\\Code.exe' --wait
[diff]
tool = diffmerge
@jeremy-jameson
jeremy-jameson / gist:cc127c4b003a4e00a208c8448f35dc97
Last active January 22, 2026 16:32
Install and configure pgAdmin 4 on Debian 13 LXC
clear
# Install pgAdmin 4
# Reference: https://www.pgadmin.org/download/pgadmin-4-apt/
## pgAdmin 4 installation prerequisites
### Install lsb_release (not included in Debian 13)
sudo apt install lsb-release
### Setup the repository
<VirtualHost *:80>
ServerName pgadmin.corp.techtoolbox.us
Redirect / https://pgadmin.corp.techtoolbox.us/
</VirtualHost>
<VirtualHost *:443>
ServerName pgadmin.corp.techtoolbox.us
#LogLevel debug
ErrorLog ${APACHE_LOG_DIR}/pgadmin-error.log
CustomLog ${APACHE_LOG_DIR}/pgadmin-access.log combined
LoadModule wsgi_module modules/mod_wsgi.so
@jeremy-jameson
jeremy-jameson / main.js
Created March 6, 2025 17:08
JavaScript used to migrate Bitwarden work passwords to personal vault
const fs = require("fs");
const path = require("path");
const personalPasswordsFilePath = path.join(__dirname, "personal.json");
const workPasswordsFilePath = path.join(__dirname, "technology-toolbox.json");
const outputFilePath = path.join(__dirname, "tmp.json");
// Reference: https://stackoverflow.com/a/979325
const sort_by = (field, reverse, primer) => {
const key = primer
@jeremy-jameson
jeremy-jameson / Bulk Create Test E-mail Accounts in Poste.io Using PowerShell.md
Created February 25, 2020 18:10
Bulk Create Test E-mail Accounts in Poste.io Using PowerShell

Bulk Create Test E-mail Accounts in Poste.io

$uri = "https://mail-test.technologytoolbox.com/admin/api/v1/boxes"

$userPassword = "{specify test mail password here}"

$adminUsername = "admin@technologytoolbox.com"
$adminPassword = "{specify Poste.io admin password here}"
$credentials = "${adminUsername}:${adminPassword}"
@jeremy-jameson
jeremy-jameson / Shrink Transaction Logs.sql
Created January 25, 2020 12:59
Shrink transaction log files in SQL Server
IF OBJECT_ID('tempdb.dbo.#CommandQueue', 'U') IS NOT NULL
BEGIN
DROP TABLE #CommandQueue
END
CREATE TABLE #CommandQueue
(
ID INT IDENTITY (1, 1)
, SqlStatement VARCHAR(1000)
)
@jeremy-jameson
jeremy-jameson / Fix MDW rpt_query_stats procedure.sql
Last active December 20, 2019 17:13
Fix for bug in SQL Server Management Data Warehouse (rpt_query_stats procedure)
USE [MDW]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [snapshots].[rpt_query_stats]
@jeremy-jameson
jeremy-jameson / Start and stop cluster VMs.md
Last active December 10, 2019 16:42
Start and stop cluster VMs (using System Center Virtual Machine Manager)

# Start and stop cluster VMs (using System Center Virtual Machine Manager)

# Create cluster VM list with "startup order"

$url = 'https://gist.githubusercontent.com/jeremy-jameson' `
    + '/913c11a4550efe428bbe7d6e1c82c955/raw'

Invoke-WebRequest `
    -UseBasicParsing `
@jeremy-jameson
jeremy-jameson / Cluster VMs.csv
Last active July 4, 2022 12:39
Sample list of virtual machines running on a cluster with "startup order"
Name StartupOrder
CIPHER01 4
CON-ADFS01 302
CON-DC05 300
CON-DC06 301
CON-W10-TEST-03 303
CRYPTID 0
EXT-ADFS01A 0
EXT-ADFS03A 108
EXT-ADFS03B 109
@jeremy-jameson
jeremy-jameson / Configure symbolic links for Git repositories.md
Last active December 6, 2019 16:48
Configure symbolic links for Git repositories