Skip to content

Instantly share code, notes, and snippets.

jftuga / rows_cols.go
Created Mar 13, 2019
two dimensional slice in Go
View rows_cols.go
package main
import (
jftuga / add.reg
Last active Mar 16, 2019
Add command to Windows context menu
View add.reg
Windows Registry Editor Version 5.00
View getDNSInfo.go
// +build windows
package main
import (
jftuga / bufWrite.go
Created Sep 9, 2019
demonstrates how to either write to STDOUT or to a buffer in golang
View bufWrite.go
// demonstrates how to either write to STDOUT or to a buffer
package main
import (
jftuga /
Last active Sep 19, 2020
May 2020 Chocolatey installed packages and VSCode extensions

Chocolatey Notes

Install a package

choco install [package] -a (use -a or -y to install without any prompts)

Non-interactive configuration

choco feature enable -n allowGlobalConfirmation (sets global default to not prompt, assume yes)

jftuga / getNames.bat
Created Dec 31, 2019
Quick jq example
View getNames.bat
@echo off
rem use -r to return strings without surrounding double-quotes
jq -r ".Buckets | .[] | .Name" s3.json
jftuga / go-aws-new.go
Created Jan 12, 2020
Fixed version of go-aws-new.go
View go-aws-new.go
package main
import (
awsNews ""
func main() {
View Remove_PDF_Pages.ps1
-John Taylor
This is a simple, GUI frontend to pdfcpu.
The resulting PDF will have the filename appended with "--RemovedPages.pdf"
jftuga /
Last active May 19, 2020
Raspberry Pi backup script
# Side note:
# for better performance append to /etc/sysctl.conf (and then reboot)
# vm.vfs_cache_pressure = 50
# vm.swappiness = 10
# vm.dirty_writeback_centisecs = 1500
# location of backups
jftuga / active_directory_contacts.cs
Last active Oct 13, 2020
Retrieve Active Directory Contacts Belonging to a Group
View active_directory_contacts.cs
Given an AD group name, return all of the AD Contacts that belong to that group
Return a list of strings in this format:
CN Name|Email Address
using System.DirectoryServices;