Skip to content

Instantly share code, notes, and snippets.

View devzer01's full-sized avatar
💾
atuwa tiika

Nayana Hettiarachchi devzer01

💾
atuwa tiika
View GitHub Profile
@devzer01
devzer01 / tokenid-cap-architecture.md
Created May 19, 2026 04:39
TokenID — Free-tier per-lead cap management architecture

TokenID — Free-Tier Per-Lead Cap Management

Architecture spec for the per-lead daily verification cap, with HubSpot as the sales/support edit surface and the TokenID backend as the runtime source of truth.

Goal

Sales and support need to bump an individual lead's daily verification cap without filing engineering tickets. The verifier hot path must not depend on

@devzer01
devzer01 / LINUX_AMD64.gz.b64
Created April 29, 2026 10:52
jq 1.7.1 binaries (gzip+base64) for journal-logger v2 installer
This file has been truncated, but you can view the full file.
@devzer01
devzer01 / bootlog
Created August 1, 2020 05:21
osx boot log
sudo log show --predicate "processID == 0" --start $(date "+%Y-%m-%d") --debug
alias bootlog='sudo log show --predicate "processID == 0" --start $(date "+%Y-%m-%d") --debug'
@devzer01
devzer01 / proc_cpuinfo
Created July 25, 2020 22:24
ACER Aspire 3 A314-32-43NH
(chroot) livecd / # cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 21
model : 112
model name : AMD A4-9120e RADEON R3, 4 COMPUTE CORES 2C+2G
stepping : 0
microcode : 0x6006705
cpu MHz : 1361.900
cache size : 1024 KB
@devzer01
devzer01 / docker-compose.yml
Last active May 2, 2024 04:15
docker-compose mongodb
version: '3'
services:
database:
image: 'mongo'
container_name: 'my-mongo-container' # give your contatner a name
environment:
- MONGO_INITDB_DATABASE=your-database-name # database name you want to make
- MONGO_INITDB_ROOT_USERNAME=my-container-root-username # set your container root username
- MONGO_INITDB_ROOT_PASSWORD=secret # set your contatner root password
volumes:
<activemq.version>5.15.11</activemq.version>
<antlr2.version>2.7.7</antlr2.version>
<appengine-sdk.version>1.9.77</appengine-sdk.version>
<artemis.version>2.10.1</artemis.version>
<aspectj.version>1.9.5</aspectj.version>
<assertj.version>3.13.2</assertj.version>
<atomikos.version>4.0.6</atomikos.version>
<awaitility.version>4.0.2</awaitility.version>
<bitronix.version>2.1.4</bitronix.version>
<build-helper-maven-plugin.version>3.0.0</build-helper-maven-plugin.version>
@devzer01
devzer01 / i18n.js
Created March 14, 2020 23:42
fix one problem and create many for no good reason code
var content = document.createElement('div')
content.id = 'alert';
content.style.width = '100%';
content.innerHTML = 'tax translation helper is loaded';
content.style.height = '100px';
content.style.textAlign = 'center';
content.style.display = 'none';
var body = document.getElementsByTagName('body')[0];
body.appendChild(content);
@devzer01
devzer01 / kill-pgsql-session.sql
Created February 14, 2020 07:24
killing postgresql sessions
-- this query kills any active session attached to the 'dbname' database, which can prevent you from
-- running certain administrative operations on the database
select pg_terminate_backend(pid)
from pg_stat_activity
where pid IN (select pid from pg_stat_activity where datname = 'dbname');
@devzer01
devzer01 / gitlab-pipeline-trigger-looper.sh
Created February 14, 2020 05:36
gitlab pipeline run until pass looper.
#!/bin/bash
PRIVATE_TOKEN="create from your gitlab profile"
TRIGGER_TOKEN="get from the project ci/cd triggers"
GITLAB_URL="https://gitlab.com"
PROJECT_ID="you can find this using gitlab api or under the gitlab project settings"
REF="master" #this can also be a branch name or a commit hash
SLEEP_SECONDS=1
while true
do
# tmux shortcuts & cheatsheet
start new:
tmux
start new with session name:
tmux new -s myname