Skip to content

Instantly share code, notes, and snippets.

@PiiiRKO
PiiiRKO / glance.yml
Last active December 1, 2025 20:31
**Important**: Replace `YOUR_SERVER_IP`, `DEMO_KEY`, and `YOUR_SPEEDTEST_TOKEN` with your own values! For the F1 widget you have to use the API from here - https://github.com/SkyAllinott/glance-F1
pages:
- name: Home
columns:
- size: small # Left column
widgets:
- type: to-do
- type: calendar
- type: markets

Bank‑Based Anonymous Age Verification (BAV)

A zero‑storage, privacy‑preserving age check that leverages banks’ existing KYC — with the user as the transport layer.


TL;DR

  • Banks sign an age claim, not an identity. They never learn which site you’re visiting.
  • Merchants verify a short‑lived token against their own nonce and a one‑time WebAuthn key. No database required.
@jwbee
jwbee / jq.md
Last active July 15, 2025 12:12
Make Ubuntu packages 90% faster by rebuilding them

Make Ubuntu packages 90% faster by rebuilding them

TL;DR

You can take the same source code package that Ubuntu uses to build jq, compile it again, and realize 90% better performance.

Setting

I use jq for processing GeoJSON files and other open data offered in JSON format. Today I am working with a 500MB GeoJSON file that contains the Alameda County Assessor's parcel map. I want to run a query that prints the city for every parcel worth more than a threshold amount. The program is

@abe-winter
abe-winter / zonal-cluster.md
Last active June 19, 2024 15:41
migrating GKE to zonal cluster

GKE zonal cluster migration

Apparently a GKE cluster costs $75 a month; this is the most expensive component of the cloud bill for my side project. There is a free tier ... but I recently learned it only applies to zonal clusters, not regional clusters. Much to my chagrin. The pricing docs are very unclear.

So I moved from a regional cluster to a zonal cluster. If you know kube at all you know this is not the kind of thing kube makes easy.

Hard parts about this:

  • moving the storage over
  • recreating the NEGs
@dannberg
dannberg / obsidian-people-template.txt
Last active October 1, 2025 23:46
Dann Berg's People Template for Obsidian. Uses Dataview & Templater plugins. Should be saved as a Markdown file in Obsidian. See full tutorial for setup instructions: https://dannb.org/blog/2022/obsidian-people-note-template/
---
company:
location:
title:
email:
website:
aliases:
---
tags:: [[👥 People MOC]]
@ACK-J
ACK-J / ThreatMetrixData.txt
Created April 4, 2021 21:28
All the data the ThreatMetrix script collects after running and sends back to Lexis Nexis.
agent_publickey = 3059301306072a8648ce3d020106082a8648ce3d03010703420004f2b81b1902a771c8c24f09c6bd8be647d33bd139269856418a42c5a78343d943a03ac2173529a816f797a803563de6ecdd25572ce09af8c081c02303bac0c4d3
agent_publickey_hash = 525f76180e55012341ffe12bcfb5587adad1b920
agent_publickey_hash_result = not found
agent_publickey_hash_type = web:ecdsa
agent_type = browser_computer
alert_id = 9598
api_call_datetime = 2019-12-16 15:24:42.595
api_key = fioxxxxxxxxxx370
api_site_id = api101.qa2.sac.
api_type = session-query
@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)
%%time
cols = ['obs', 'year', 'month', 'day', 'date', 'latitude', 'longitude',
'zon.winds', 'mer.winds', 'humidity', 'air temp.', 's.s.temp.']
nino = pd.read_csv('data/tao-all2.dat.gz', sep=' ', names=cols, header=None,
na_values='.', parse_dates=[[1,2,3]])
cols = [c.strip().rstrip('.').replace(' ', '_').replace('.', '_')
for c in nino.columns]
nino.columns = cols
nino.date = pd.to_datetime(nino.date, format='%y%m%d')
nino['zon_winds_mph'] = nino.zon_winds * 2.237

Core Coding Standard

Coding practices are a source of a lot of arguments among programmers. Coding standards, to some degree, help us to put certain questions to bed and resolve stylistic debates. No coding standard makes everyone happy. (And even their existence is sure to make some unhappy.) What follows are the standards we put together on the Core team, which have become the general coding standard for all programming teams on new code development. We’ve tried to balance the need for creating a common, recognizable and readable code base with not unduly burdening the programmer with minor code formatting concerns.

Table Of Contents

@jdarpinian
jdarpinian / executable.c
Last active September 28, 2025 09:40
Add one line to your C/C++ source to make it executable.
///$(which true);FLAGS="-g -Wall -Wextra --std=c17 -O1 -fsanitize=address,undefined";THIS_FILE="$(cd "$(dirname "$0")"; pwd -P)/$(basename "$0")";OUT_FILE="/tmp/build-cache/$THIS_FILE";mkdir -p "$(dirname "$OUT_FILE")";test "$THIS_FILE" -ot "$OUT_FILE" || $(which clang || which gcc) $FLAGS "$THIS_FILE" -o "$OUT_FILE" || exit $?;exec bash -c "exec -a \"$0\" \"$OUT_FILE\" $([ $# -eq 0 ] || printf ' "%s"' "$@")"
#include <stdio.h>
int main() {
printf("Hello world!\n");
return 0;
}