Skip to content

Instantly share code, notes, and snippets.

View tt's full-sized avatar

Troels Thomsen tt

View GitHub Profile
@eseiler
eseiler / README.md
Last active October 29, 2025 23:01
Remove Phantom Notifications

Remove Phantom Notifications on GitHub

This tool helps you clean up GitHub notifications from repositories that no longer exist ("phantom notifications"), which can clutter your notification feed.

The Node.js script comes from this GitHub Community discussion with minor modifications to console output.

Compatibility

  • The Node.js script works on any platform that supports Node.js
  • The integration shown in these instructions uses bash as the shell, but the concepts can be adapted to other shells (zsh, fish, etc.)
@mhoye
mhoye / gist:dcc2c2febeba230ca7ceb25c970390a1
Last active June 9, 2026 18:48
uBlock Origin Bonus Content
||youtube.com$domain=~youtube.com # Don't pull youtube JS unless you're using youtube. This breaks
# embedded videos, which is mildly inconvenient, but makes everything much faster.
# This blocks a lot of Google everywhere but Google.
||www.gstatic.com$domain=~google.com
||gstatic.com$domain=~google.com # Don't use gstatic unless you're on Google. This might
# break some things but so far I haven't noticed any problems.
||accounts.google.com$domain=~google.com # Don't pop up the "log in with google" dialog everywhere. This makes the
# internet feel about 95% less creepy.
@johnlindquist
johnlindquist / focus-tab-explanation.md
Last active May 20, 2026 18:25
Focus-Tab: AppleScript utility for opening or focusing browser tabs from the command line

Focus-Tab: Browser Tab Manager for macOS

Overview

Focus-Tab is an AppleScript utility that allows you to quickly open or switch to specific websites in your browser from the command line. It's particularly useful for:

  • Workflow automation
  • Quick navigation to frequently visited sites
  • Scripts and shell aliases for browser-based tools
  • Integration with other automation tools
@jeremystretch
jeremystretch / github_notifications_fix.md
Created June 12, 2024 14:11
Mark GitHub notifications as read

I've needed to do this several times to combat "ghost" notifications. These occur when a discussion is created and then deleted (e.g. for spam) before the notofication is read. You may see something like "1-0 of 4" at the bottom of the notifications page.

You can use the GitHub API client to show these notifications:

gh api notifications

To mark all notifications as read, send the API request below with curl. (Update the last_read date as needed.)

@MarvinJWendt
MarvinJWendt / Go Module Count by Domain
Created April 8, 2024 23:35
Count of all Go modules by domain as of 2024.04.09
Total go modules: 1288407
github.com: 1218651
gitlab.com: 12372
gitee.com: 8497
gopkg.in: 5746
go-micro.dev: 3494
github.com: 3209
github.com: 2487
bitbucket.org: 2347
@fabiolimace
fabiolimace / UUIDv7_SQLITE_VIEW.sql
Last active April 20, 2026 23:31
UUIDv7 for SQLite using view and triggers
DROP VIEW IF EXISTS uuid7;
CREATE VIEW uuid7 AS
WITH unixtime AS (
SELECT CAST((STRFTIME('%s') * 1000) + ((STRFTIME('%f') * 1000) % 1000) AS INTEGER) AS time
-- SELECT CAST((UNIXEPOCH('subsec') * 1000) AS INTEGER) AS time -- for SQLite v3.38.0 (2022)
)
SELECT PRINTF('%08x-%04x-%04x-%04x-%012x',
(select time from unixtime) >> 16,
(select time from unixtime) & 0xffff,
ABS(RANDOM()) % 0x0fff + 0x7000,
@IanColdwater
IanColdwater / twittermute.txt
Last active June 19, 2026 17:31
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet

Various search databases and backends as alternatives to Elasticsearch.

Rust

@lizthegrey
lizthegrey / attributes.rb
Last active April 29, 2026 20:02
Hardening SSH with 2fa
default['sshd']['sshd_config']['AuthenticationMethods'] = 'publickey,keyboard-interactive:pam'
default['sshd']['sshd_config']['ChallengeResponseAuthentication'] = 'yes'
default['sshd']['sshd_config']['PasswordAuthentication'] = 'no'