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
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 = "git@github.com: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 January 7, 2024 21:40
hashdeep orchestrator for data integrity checks in home folder
#!/bin/sh -v
cd ~
hash_file="Documents/hashdeep-checksums.txt"
mv "$hash_file" "$hash_file.bak"
time hashdeep -c md5 -of -r -l Music Downloads Documents Pictures Phone Dropbox repo oneplus9-home | tee "$hash_file"
#!/bin/sh
# tag grabber from: https://gist.github.com/lukechilds/a83e1d7127b78fef38c2914c4ececc3c
# original install instructions https://docs.docker.com/compose/install/
latest_tag=`curl --silent "https://api.github.com/repos/docker/compose/releases/latest"|grep '"tag_name":'|sed -E 's/.*"([^"]+)".*/\1/'`
target=~/Documents/programs/bin/docker-compose
curl -L "https://github.com/docker/compose/releases/download/$latest_tag/docker-compose-$(uname -s)-$(uname -m)" -o $target
chmod +x $target