Skip to content

Instantly share code, notes, and snippets.

View stojg's full-sized avatar

Stig Lindqvist stojg

View GitHub Profile
@stojg
stojg / rollbar-item
Created July 22, 2026 04:24
rollbar-item
#!/usr/bin/env bash
#
# rollbar-item — download a Rollbar item by its per-project counter.
#
# The counter is the number shown in the Rollbar UI and in item URLs
# (e.g. #13968). The API resolves it to an internal item id and then
# returns the full item.
#
# https://docs.rollbar.com/reference/get-an-item-by-project-counter
#
# Triage a Linear issue
You are a **read-only** triage analyst for the https://github.com/<org>/<repo> codebase and looking for similar tickets.
Read-only contract:
- Do **not** modify, commit, or change the ticket in anyway.
## No PII / customer data — anywhere
The ticket may contain PII or customer information: person names, emails, phone numbers, customer/account/organisation names, account ids, tenant ids, user ids, billing data, IP addresses, API tokens, or free-text that identifies a real customer.
@stojg
stojg / algo.ts
Created November 4, 2022 00:22
How many of my favourite things should I buy?
function HowManyIsEnough(n: number) : number {
return n + 1
}
@stojg
stojg / server-name-wordlist-mnemonic.txt
Created September 6, 2022 23:12 — forked from bwbaugh/server-name-wordlist-mnemonic.txt
Server name wordlist (mnemonic)
# Original blog post: <https://mnx.io/blog/a-proper-server-naming-scheme/>
# Original word list: <http://web.archive.org/web/20091003023412/http://tothink.com/mnemonic/wordlist.txt>
# Sample usage: `curl <gist> | tail --lines +4 | shuf | head --lines 1`
acrobat
africa
alaska
albert
albino
album
alcohol
@stojg
stojg / postgres_queries_and_commands.sql
Created April 28, 2021 01:28 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@stojg
stojg / keybase.md
Created April 1, 2020 03:50
keybase.md

Keybase proof

I hereby claim:

  • I am stojg on github.
  • I am stojg (https://keybase.io/stojg) on keybase.
  • I have a public key ASB_XpPl1n_gZ9b6be0KAUwCV7CHuGWXj0UFJGnJhESWjQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am stojg on github.
  • I am stojg (https://keybase.io/stojg) on keybase.
  • I have a public key ASAXrGdkyAeTpbLy6bmEMZ3sDC0S3HVnfR0m1p5ujhJcMgo

To claim this, I am signing this object:

@stojg
stojg / slowpoke.go
Created December 16, 2017 02:15
go program to run after a slow process, which sends you a text so that you know when it's finished
// This golang program is a remix/parody of https://gist.github.com/mrmorphic/7cb86c7b1a5e3da9d8664d6e8a1e3518
// that notifies the user that notifies a user after a slow process have finished, but instead of using the computers
// speech synthesiser or notification system, sends you a text instead. This means that you can leave the safe confines
// of your desk while scavenging office supplies, stalk colleagues or have a quiet smoko. I.e. it's the 2020 version of
// https://xkcd.com/303/. Ideal for those dependency fetching / compiling steps.
//
// To make this work you need to at least setup a `https://www.twilio.com` trial account and define a couple ENV
// variables:
//
// # Get this from your twilio account
@stojg
stojg / Features.php
Created April 5, 2017 00:27
Playing around with features
<?php
// could be abstract class?
interface FeatureInterface {
function isSupported();
}
interface LetmeinInterface extends FeatureInterface {
function letmein($username, $password);
}
@stojg
stojg / rm-corrupt.sh
Last active October 4, 2016 05:27 — forked from codepunkt/rm-corrupt.sh
find/delete corrupt whisper-files
#!/bin/bash
options=('find' 'delete')
PS3='state your wish: '
echo -e "\nfind/delete corrupt whisper-files"
select opt in "${options[@]}"; do
case $REPLY in
[12] ) option=$opt; break;;
* ) exit;;