Skip to content

Instantly share code, notes, and snippets.

View joakime's full-sized avatar

Joakim Erdfelt joakime

  • Webtide, LLC
  • McAllen, TX
View GitHub Profile
@joakime
joakime / claude-git-checkout-deprecated.md
Created October 29, 2026 11:48
Is git checkout deprecated?

Is git checkout deprecated?

Q: I heard that "git checkout" is deprecated? Why? When? What's the reason? What's the replacement?

Short answer

git checkout isn't actually deprecated. It still works, there's no deprecation warning, and it isn't on the list of things slated for removal. What happened is that Git added two newer commands meant to replace it for everyday use, which is probably where the "deprecated" rumor comes from.

What happened and when

URL handling: RFC 3986 vs. WHATWG URL Standard

Two models exist, and they are not interchangeable.

  • RFC 3986 / RFC 9110 / RFC 6455: a grammar plus optional normalization steps (RFC 3986 §6). Invalid input is undefined.
  • WHATWG URL Standard (https://url.spec.whatwg.org/): a parser (§4.4) that turns any string into a URL record or failure, and a serializer (§4.5). There is no separate "normalization" phase; what the parser does is the normalization. Its stated goal is to obsolete
@joakime
joakime / min-json-aistudio.json
Last active April 28, 2026 20:32
Minimum viable 1.6 SBOM for broad compatibility with audit tooling (per various AIs)
{
"bomFormat": "CycloneDX",
"specVersion": "1.6",
"serialNumber": "urn:uuid:3e671687-395b-41f5-a30f-a58921a69b79",
"version": 1,
"metadata": {
"timestamp": "2024-05-20T12:00:00Z",
"component": {
"bom-ref": "my-app@1.0.0",
"type": "application",
@joakime
joakime / getjvm.sh
Created November 10, 2025 16:54
Script to get the latest of a specific major version of a JVM from Adoptium, using api.adoptium.net
#/usr/bin/env bash
# See https://api.adoptium.net/q/swagger-ui/ for documentation about api.adoptium.net
# For valid list of values for the following, see documentation about API
# See: https://api.adoptium.net/v3/info/available_releases
JVM_FEATURE="$1"
if [ -z $JVM_FEATURE ] ; then
@joakime
joakime / sig.c
Created January 21, 2024 22:55
Old school geeky email signature
/* joakim@erdfelt.com GCS v* w++ N+ */ main(){char h[81],*k,x,y,c,i;float a,
b,t,d,e,f,g,z;z=25;for(i=50;i--;){printf("\x1b[2J");g=z/40;f=z/17;z*=.8;for(d=
.285+z,y=49;y--;d-=f){for(k=h,e=1.1586+z,x=79;x--;e-=g){for(c=180,b=a=0;--c&&b
*b+a*a<4;t=b,b=b*b-a*a-e,a=2*t*a+d);*k++=c?c&1?99:88:32;h[79]=0x0;}puts(h);}}}
### Keybase proof
I hereby claim:
* I am joakime on github.
* I am joakime (https://keybase.io/joakime) on keybase.
* I have a public key whose fingerprint is 94B4 F5A0 49E5 A9BA 9DEB EAD4 6955 55F7 03DD EB3B
To claim this, I am signing this object:
@joakime
joakime / JrtDemo.java
Created August 4, 2022 22:02
Walk all of JRT with Java NIO FileSystem
package fs;
import java.io.IOException;
import java.net.URI;
import java.nio.file.FileSystem;
import java.nio.file.FileSystems;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.Map;
import java.util.concurrent.atomic.AtomicInteger;
@joakime
joakime / A.java
Created April 28, 2022 15:09
Huge Class File Example
class A {{
int a;
try {a=0;} finally {
try {a=0;} finally {
try {a=0;} finally {
try {a=0;} finally {
try {a=0;} finally {
try {a=0;} finally {
try {a=0;} finally {
try {a=0;} finally {
@joakime
joakime / big-class.sh
Last active December 3, 2021 00:57
Example of a small java source to big class file
# The raw file size
$ ls -l
total 4
-rw-rw-r-- 1 joakim joakim 564 Nov 11 16:01 A.java
# The java source contents
$ cat A.java
class A {{
int a;
try {a=0;} finally {
@joakime
joakime / git_objectid_size.log
Last active November 10, 2021 21:40
How to see what the largest object ids are in a branch.
[joakim@hyperion tmp]$ git clone git@github.com:eclipse/jetty.project.git
Cloning into 'jetty.project'...
remote: Enumerating objects: 760026, done.
remote: Counting objects: 100% (15474/15474), done.
remote: Compressing objects: 100% (6625/6625), done.
remote: Total 760026 (delta 5693), reused 14847 (delta 5266), pack-reused 744552
Receiving objects: 100% (760026/760026), 228.80 MiB | 37.67 MiB/s, done.
Resolving deltas: 100% (307533/307533), done.
[joakim@hyperion tmp]$ git ls-tree -r -t -l --full-name HEAD | sort -n -k 4 | tail -n 10
fatal: not a git repository (or any parent up to mount point /)