Skip to content

Instantly share code, notes, and snippets.

View dacr's full-sized avatar
🕷️

Crosson David dacr

🕷️
View GitHub Profile
@dacr
dacr / hello-utf8.go
Created March 28, 2025 09:02
go hello world using utf-8 - take care string length / published by https://github.com/dacr/code-examples-manager #88f7ff00-9eb5-4e7f-aadc-9258378a45ab/d3f79abeafd82ac1dd89873bb858ceaea8dbd5a5
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go hello world using utf-8 - take care string length
// keywords : go, hello-world, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 88f7ff00-9eb5-4e7f-aadc-9258378a45ab
// created-on : 2025-03-27T09:10:35+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
@dacr
dacr / regex.nix
Created March 28, 2025 09:02
nix regex / published by https://github.com/dacr/code-examples-manager #5bb58db7-1af1-41a7-b835-3f1fc55c3baf/bd98af9ebc85a11957c64d02aa3ec11cfeb9bf14
## summary : nix regex
## keywords : nix, regex
## publish : gist
## authors : David Crosson
## license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
## id : 5bb58db7-1af1-41a7-b835-3f1fc55c3baf
## created-on : 2025-02-07T17:13:13+01:00
## managed-by : https://github.com/dacr/code-examples-manager
## run-with : nix eval --file $file
#### run-with : nix-instantiate --eval $file
@dacr
dacr / concurrency-channels.go
Created March 28, 2025 09:02
go channels / published by https://github.com/dacr/code-examples-manager #133f6548-95e4-4630-ac02-5a56f36b343c/f7e80500578717ba90eb8e8bb0b6a210f7f8b3a7
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go channels
// keywords : go, channels, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 133f6548-95e4-4630-ac02-5a56f36b343c
// created-on : 2025-03-27T16:03:54+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
@dacr
dacr / concurrency-context.go
Created March 28, 2025 09:02
go context / published by https://github.com/dacr/code-examples-manager #7c71a8a9-8170-4ade-b396-58834bd30b03/58276355af21d0cef4f0455802c4b2608ea06831
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go context
// keywords : go, context, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 7c71a8a9-8170-4ade-b396-58834bd30b03
// created-on : 2025-03-27T16:56:13+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
@dacr
dacr / interfaces.go
Created March 28, 2025 09:02
go interfaces / published by https://github.com/dacr/code-examples-manager #86809bee-7d41-4bca-ac58-78ac3ef26952/5a003f867e21af6ce00a9cc04eb76b4d9ddded0b
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go interfaces
// keywords : go, interfaces, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 86809bee-7d41-4bca-ac58-78ac3ef26952
// created-on : 2025-03-27T13:30:23+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
@dacr
dacr / lambdas.go
Created March 28, 2025 09:02
go lambdas / published by https://github.com/dacr/code-examples-manager #27ede8f8-b106-476e-bb2d-02a7bae0f6ab/d4a236ef95f128be685ad039f34e4859e902401
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go lambdas
// keywords : go, lambdas, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : 27ede8f8-b106-476e-bb2d-02a7bae0f6ab
// created-on : 2025-03-27T09:55:31+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
@dacr
dacr / catsparse-hello-4.sc
Created March 28, 2025 09:02
cats-parse graph query language experiment - hello world 4 / published by https://github.com/dacr/code-examples-manager #fc484393-ce97-44b6-bf6c-8f8addbf6a41/ffa6b8ec459a6a34c644662cca52821b325cdc9c
// summary : cats-parse graph query language experiment - hello world 4
// keywords : scala, typelevel, cats-parse, hello-world, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : fc484393-ce97-44b6-bf6c-8f8addbf6a41
// created-on : 2025-03-13T14:22:01+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : scala-cli $file
@dacr
dacr / pointers.go
Created March 28, 2025 09:02
go pointers / published by https://github.com/dacr/code-examples-manager #c4cdd92d-c11b-4e88-8090-2b2d00926bd0/fc90853ade1e1e61c041e7897b109e848d171f4e
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go pointers
// keywords : go, pointers, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : c4cdd92d-c11b-4e88-8090-2b2d00926bd0
// created-on : 2025-03-27T11:01:31+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
@dacr
dacr / defer.go
Created March 28, 2025 09:02
go defer / published by https://github.com/dacr/code-examples-manager #e38796ac-819e-496d-b689-27c0236b4e17/8b306935d6d781f14c75fc6b1fa5c6b1ca81f3f1
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go defer
// keywords : go, defer, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : e38796ac-819e-496d-b689-27c0236b4e17
// created-on : 2025-03-27T10:06:35+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"
@dacr
dacr / concurrency-channels-buffering.go
Created March 28, 2025 09:02
go channels buffering / published by https://github.com/dacr/code-examples-manager #c0b7c67c-1366-4b78-983f-1736abbf5a89/62e5f580c37fd6def296cf0d8d1b6dc6dcd2f94e
/*?sr/bin/true; exec /usr/bin/env nix-shell -p go --run "go run $0" #*/
// summary : go channels buffering
// keywords : go, channels, @testable
// publish : gist
// authors : David Crosson
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
// id : c0b7c67c-1366-4b78-983f-1736abbf5a89
// created-on : 2025-03-27T16:18:41+01:00
// managed-by : https://github.com/dacr/code-examples-manager
// run-with : nix-shell -p go --run "go run $file"