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:dc4a4a4e0ed3ca6d21a9ccc9ba337c54
Created August 13, 2025 04:39
Better dd img to sd/usb options
sudo dd if=2025-05-13-raspios-bookworm-arm64-lite.img of=/dev/mmcblk0 bs=4M status=progress oflag=sync
@jd-boyd
jd-boyd / gist:11786455912d956ac55c68c07c865222
Created July 30, 2025 00:01
llm llm-mlx Codestral error
% llm mlx download-model mlx-community/Codestral-22B-v0.1-4bit
config.json: 100%|█████████████████████████████| 716/716 [00:00<00:00, 6.01MB/s]
convert_mistral_weights_to_hf-22B.py: 11.3kB [00:00, 20.6MB/s]<00:03, 2.51it/s]
model.safetensors.index.json: 111kB [00:00, 45.4MB/s] | 0.00/716 [00:00<?, ?B/s]
special_tokens_map.json: 100%|█████████████████| 414/414 [00:00<00:00, 7.03MB/s]
tokenizer_config.json: 100%|███████████████████| 960/960 [00:00<00:00, 1.65MB/s]
tokenizer.json: 1.82MB [00:00, 18.5MB/s] | 0.00/1.84G [00:00<?, ?B/s]
tokenizer.model: 100%|████████████████████████| 587k/587k [00:01<00:00, 413kB/s]
tokenizer.json: 0.00B [00:00, ?B/s]
model-00003-of-00003.safetensors: 100%|████| 1.84G/1.84G [11:48<00:00, 2.60MB/s]
@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"