Skip to content

Instantly share code, notes, and snippets.

View andreimerlescu's full-sized avatar
🤩
www.i18n.software

Andrei Merlescu andreimerlescu

🤩
www.i18n.software
View GitHub Profile
@andreimerlescu
andreimerlescu / jamiepine-voicebox-silicon.sh
Created September 19, 2026 15:04
Fix voicebox build automation on Apple Silicon M4 with this script. Use as `./silicon.sh install` and `./silicon.sh run` to operate.
#!/usr/bin/env bash
# bad_error "message" [|0|1]
function bad_error()
{
local msg="${1:-}"
local yah="${2:-1}"
echo "🚨: ${msg} ❌"
echo ""
if [[ "${yah}" == "1" ]]; then

When using time.Duration in #Go, it's captured as an int and requires you to use time.Duration values.

Human Time int Value Go Syntax
1s 1000000000 1 * time.Second
5s 5000000000 5 * time.Second
10s 10000000000 10 * time.Second
15s 15000000000 15 * time.Second
20s 20000000000 20 * time.Second
25s 25000000000 25 * time.Second
@andreimerlescu
andreimerlescu / bootstrap-icons.1.13.1.icons-list.json
Created September 7, 2026 15:47
The icons list in JSON format for every Bootstrap Icons v1.13.1 matching icon from their search.js tool!
["0-circle","0-circle-fill","0-square","0-square-fill","1-circle","1-circle-fill","1-square","1-square-fill","123","2-circle","2-circle-fill","2-square","2-square-fill","3-circle","3-circle-fill","3-square","3-square-fill","4-circle","4-circle-fill","4-square","4-square-fill","5-circle","5-circle-fill","5-square","5-square-fill","6-circle","6-circle-fill","6-square","6-square-fill","7-circle","7-circle-fill","7-square","7-square-fill","8-circle","8-circle-fill","8-square","8-square-fill","9-circle","9-circle-fill","9-square","9-square-fill","activity","airplane","airplane-engines","airplane-engines-fill","airplane-fill","alarm","alarm-fill","alexa","align-bottom","align-center","align-end","align-middle","align-start","align-top","alipay","alphabet","alphabet-uppercase","alt","amazon","amd","android","android2","anthropic","app","app-indicator","apple","apple-music","archive","archive-fill","arrow-90deg-down","arrow-90deg-left","arrow-90deg-right","arrow-90deg-up","arrow-bar-down","arrow-bar-left","arrow-bar-
<?php declare(strict_types=1);
namespace AVC;
class Shabbat
{
public static function enforce(): void {
if (is_falsy(from_server(key: IS_DEV)) && self::is_shabbat()) {
self::send_headers();
echo self::render_shabbat();

אלוהי אומר לי לומר לכם, רשת הריגול של ממשלת ארה"ב הריבונית עצמה.

אני כמו יונה. עבד של יהוה הנותן לכם מסר בעל משמעות אלוהית.

ב-11/9/2026 ממשלת ארה"ב תחדל להתקיים.

אתם תצפו בזה. אני רק השליח שבא אליכם בשם ישוע, אדון האדון, מלך המלכים ומלך ישראל.

The basics

#[arg()] decorates a field in a #[derive(Parser)] struct and tells clap how to parse that field from the command line. Every option inside #[arg()] is a key-value pair.


Naming

long — creates a --flag style argument. If you write #[arg(long)] with no value, it uses the field name. If you write #[arg(long = "1p")] it uses that string instead. That's why we have:

using System;
using System.Collections.Generic;
using System.Net.Http;
using System.Text;
using System.Text.Json;
using System.Threading.Tasks;
using Amazon.Runtime;
using Amazon.Runtime.CredentialManagement;
using Amazon.IdentityManagement; // For generating the signature.
using Amazon.IdentityManagement.Model;
This NFT represents $APARIO DAO NFT Owner ##/47 of Project Apario LLC. Congratulations!
Owning this NFT grants you a position on the Project Apario Decentralized Autonomous Organization.
Project Apario LLC will be lead by this Decentralized Autonomous Organization by means of voting rights on the project's tokenomics and direction. It additionally will provide you exclusive access to the dedicated web application dao.apario.app where you'll be able to manage your ownership rights over Project Apario LLC.
Purchasing this NFT directly funds Project Apario but does not contribute anything to the APARIO/XRP AMM liquidity pool. The proceeds from this NFT will be used for compensating the development team for their labor.
Royalties on this NFT are 50% and whenever a deposit of XRP reaches Project Apario due to a resell of ownership of the token, 75% of those proceeds will be air dropped equally to all $APARIO DAO NFT owners. This is performed manually by the team members at Project Apario who manage the softwar
@andreimerlescu
andreimerlescu / go_gin_tls_tutorial.md
Last active June 10, 2023 19:38
Go + Gin + A Better Way To Do TLS/SSL

Golang w/ Gin and TLS/SSL Auto-Configuration

Sometimes you need SSL, and sometimes you want to use a self signed certificate, and sometimes you want to handle certificate rotations behind the scenes without restarting the application. This tutorial will introduce an alternative way to serve TLS/SSL with Go and Gin by leveraging a few packages that I've created to provide a seemless experience to the engineer setting up TLS for their Go Gin application.

main()

package main

import (
@andreimerlescu
andreimerlescu / go_flag_usage.go
Created June 10, 2023 14:10
Format Go Flag Into Human Readable Output
flag.Usage = func() {
w := tabwriter.NewWriter(os.Stdout, 0, 0, 2, ' ', 0)
fmt.Fprintf(w, "%v [FLAGS]\n", os.Args[0])
fmt.Fprintln(w, "Flag\tDefault\tDescription")
nl, dl, ul := 4, 7, 11
out := ""
flag.VisitAll(func(f *flag.Flag) {
out += fmt.Sprintf("-%s\t%s\t%s\n", f.Name, f.DefValue, f.Usage)
if len(f.Name)+1 > nl {
nl = len(f.Name) + 1