Skip to content

Instantly share code, notes, and snippets.

View timabell's full-sized avatar
🍵
418 I'm a teapot

Tim Abell timabell

🍵
418 I'm a teapot
View GitHub Profile
@timabell
timabell / azure-devops.sh
Created February 11, 2025 15:57
Clone all git repos in an azure devops org/project
#!/bin/bash
# list and clone repos on azure devops
# Written by gpt with a bit of prompting https://chatgpt.com/share/67ab6f86-fc00-8006-b3f8-a1c9bd252fe7
# Check if Azure CLI is installed
check_az_cli() {
if ! command -v az &> /dev/null; then
echo "Error: Azure CLI is not installed. Please install it first."
exit 1
fi
@timabell
timabell / multiples-grid.md
Created November 28, 2024 17:42
Example output for phone tech screen question
1	2	3	4	5	6	7	8	9	10
2	4	6	8	10	12	14	16	18	20
3	6	9	12	15	18	21	24	27	30
4	8	12	16	20	24	28	32	36	40
5	10	15	20	25	30	35	40	45	50
6	12	18	24	30	36	42	48	54	60
7	14	21	28	35	42	49	56	63	70
8	16	24	32	40	48	56	64	72	80
9	18	27	36	45	54	63	72	81	90
Cart
Create your application to work without either a UI or a database so you can run automated regression-tests against the application, work when the database becomes unavailable, and link applications together without any user involvement.
Japanese translation of this article at http://blog.tai2.net/hexagonal_architexture.html
Spanish translation of this article at http://academyfor.us/posts/arquitectura-hexagonal courtesy of Arthur Mauricio Delgadillo
original explanation w updates at http://wiki.c2.com/?HexagonalArchitecture and http://wiki.c2.com/?PortsAndAdaptersArchitecture
@timabell
timabell / dependency-injeciton-in-rust.md
Last active May 3, 2023 10:33
GPT tells me all the ways of doing DI in Rust
@timabell
timabell / clippy.txt
Created February 18, 2023 10:36
gitopolis clippy linting output, first rust lint ever
tim@max:~/repo/gitopolis (main)
$ cargo clippy
warning: this `else { if .. }` block can be collapsed
--> src/repos.rs:84:11
|
84 | } else {
| ____________________^
85 | | if !repo.tags.iter().any(|s| s == &tag_name.to_string()) {
86 | | repo.tags.push(tag_name.to_string());
87 | | }
[[repos]]
path = "gitopolis"
tags = ["tim"]
[repos.remotes.origin]
name = "origin"
url = "[email protected]:timabell/gitopolis.git"
[[repos]]
path = "schema-explorer"
tags = ["tim", "databases"]
# Begin Open GApps Install Log
------------------------------------------------------------------
ROM Android version | 127
ROM Build ID | twrp_lemonadep-eng 127 RQ1A.210205.004 6 test-keys
ROM Version increment | 6
ROM SDK version | 30
ROM/Recovery modversion |
Device Recovery | TWRP 3.6.0_11-0-d0b854b3
Device Name | OnePlus9Pro
Device Model | OnePlus 9 Pro 5G
#!/bin/sh
# run with `source fix-omnisharp-asdf.sh` to ensure environment variables are made available
# https://stackoverflow.com/questions/70820780/vscode-or-anothers-editors-dont-recognize-sdk-dotnet-installed-with-asdf/70820974#70820974
# tell omnisharp where to find the current dotnet sdk installed by asdf-vm
version=`asdf current dotnet-core | awk '{print $2}'`
echo "Parsed version: $version"
export DOTNET_MSBUILD_SDK_RESOLVER_SDKS_DIR=$(echo $HOME/.asdf/installs/dotnet-core/$version/sdk/$version/Sdks)
export DOTNET_MSBUILD_SDK_RESOLVER_SDKS_VER=$version
///// an exercise in object and array destructuring
// https://gist.github.com/timabell/0757735a759ed086fc57f51014392587
// https://jsfiddle.net/sz479ecd/
// object and array destructuring example
let sourceObject = {
propertyA: 2,
propertyB: [3, 4, 5],
z: 99,
};
@timabell
timabell / rehash.sh
Last active November 17, 2024 17:54
hashdeep orchestrator for data integrity checks in home folder
#!/bin/bash -v
cd "$HOME"
# in docs subdirectory so it is sync'd with syncthing
hash_file="Documents/hashdeep-checksums.txt"
mv "$hash_file" "$hash_file.bak"
backup_paths=(Music Downloads Documents Pictures Phone Dropbox repo oneplus9-home)