Skip to content

Instantly share code, notes, and snippets.

View jd-boyd's full-sized avatar

Joshua D. Boyd jd-boyd

View GitHub Profile
@jd-boyd
jd-boyd / gist:761d4b71346dcb70446daeb1ec687bd9
Created June 26, 2025 06:16
processing 4 package error
jdboyd@jdb-z440:~/tmp/processing4$ ./gradlew packageSnap
> Task :java:preprocessor:ant-preproc
warning(109): /home/jdboyd/tmp/processing4/java/src/processing/mode/java/preproc/JavaParser.g4:47:0: options ignored in imported grammar JavaParser
> Task :app:includeJdk FAILED
[Incubating] Problems report is available at: file:///home/jdboyd/tmp/processing4/.build/reports/problems/problems-report.html
FAILURE: Build failed with an exception.
@jd-boyd
jd-boyd / scp_jump.sh
Created June 24, 2025 23:55
scp proxy jump
scp -J gw:port user@internal:/path/to/source/file /local/destination/path
@jd-boyd
jd-boyd / Download.ps1
Created June 3, 2025 01:08
Download a file in Powershell.
Invoke-WebRequest $myDownloadUrl -OutFile .\file.ext
Get-ChildItem -Path . -Recurse -File | Select-String -Pattern "YourSearchString" | Format-Table Path,LineNumber,Line -AutoSize
@jd-boyd
jd-boyd / UpdateJpegCreationTimes.ps1
Last active April 7, 2025 23:04
Update JPEG file creation dates based on Exif Dates, in Powershell
# Example usage:
# . .\UpdateJpegCreationTimes.ps1
# Update-JpegCreationTimes -FolderPath "C:\Photos" -Recursive -WhatIf
# Remove -WhatIf to actually make the changes
function Convert-StringToDateTime {
param (
[Parameter(Mandatory=$true)]
[string]$DateTimeString
)
jsonObjURL := 'https://api.github.com/repos/squeak-smalltalk/squeak.org/languages'.
respObj := WebClient httpGet: jsonObjURL.
respObj content. '{"TeX":261905,"SCSS":226665,"HTML":20292,"JavaScript":2738,"Ruby":2607}' .
respCont := respObj content.
jO := Json readFrom: (ReadStream on: respCont).
jO at: 'SCSS'.
@jd-boyd
jd-boyd / windows_10_force_no_11_update.ps1
Created May 13, 2023 07:03
Force Windows 10 to no try to update to Windows 11.
# must run as admin
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v TargetReleaseversion /t REG_DWORD /d 1
reg add HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\WindowsUpdate /v TargetReleaseversionInfo /t REG_SZ /d 22H2
gpupdate /force
@jd-boyd
jd-boyd / post_example.ps1
Created April 3, 2023 04:11
PowerShell POST form, POST JSON
$params = @{"@type"="login";
"username"="[email protected]";
"password"="yyy";
}
Invoke-WebRequest -Uri http://foobar.com/endpoint -Method POST -Body $params
Invoke-WebRequest -Uri http://foobar.com/endpoint -Method POST -Body ($params|ConvertTo-Json) -ContentType "application/json"
import (
"os"
"os/signal"
)
func setupExitHandler() {
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt)
go func() {
<-c
@jd-boyd
jd-boyd / README
Created July 13, 2019 16:52
Dynamically Create SSID for Linux AP Hotspot
make_ssid.sh goes in /etc/hostapd/
The service file goes in /etc/systemd/system/