Skip to content

Instantly share code, notes, and snippets.

@rougier
rougier / nano-minibuffer.el
Created March 25, 2022 09:54
Minibuffer frame for Nano Emacs
;; Nicolas .P Rougier emacs configuration - mini-frame configuration
;; ---------------------------------------------------------------------
(require 'vertico)
(require 'marginalia)
(require 'mini-frame)
(defun minibuffer-setup ()
;; This prevents the header line to spill over second line
(let ((inhibit-message t))
@SkyyySi
SkyyySi / youtube-vanced-alternatives.md
Last active June 26, 2024 01:27
A list of alternatives after the shutdown of Vanced

NONE OF THESE CLIENTS ARE VERIFIED BY ME FOR SECURITY OR ANYTHING ELSE! USE AT YOUR OWN RISK!

These are the current alternatives (with links when possible):

@flatcap
flatcap / config.md
Created June 26, 2021 09:09
Config for NeoMutt 20210205-544-3952e7
Config Variable One-line Description
abort_backspace Hitting backspace against an empty prompt aborts the prompt
abort_key String representation of key to abort prompts
abort_noattach Abort sending the email if attachments are missing
abort_noattach_regex Regex to match text indicating attachments are expected
abort_nosubject Abort creating the email if subject is missing
abort_unmodified Abort the sending if the message hasn't
@MartijnHols
MartijnHols / useDocumentHeight.ts
Last active June 28, 2024 10:17
React hooks for getting the document height that updates when the On Screen Keyboard/Virtual Keyboard toggles
The latest version is available at https://martijnhols.nl/gists/how-to-get-document-height-ios-safari-osk
@krisek
krisek / alert.rules.yml
Last active July 5, 2024 09:36
Prometheus alert rules for node exporter
groups:
- name: node_exporter_alerts
rules:
- alert: Node down
expr: up{job="monitoring-pi"} == 0
for: 2m
labels:
severity: warning
annotations:
title: Node {{ $labels.instance }} is down
@Rich-Harris
Rich-Harris / http-apis.md
Last active November 3, 2022 09:02
Next-gen Node HTTP APIs

I saw this poll on Twitter earlier and was surprised at the result, which at the time of writing overwhelmingly favours option 1:

Screen Shot 2020-09-10 at 10 19 22 AM

I've always been of the opinion that the (req, res, next) => {} API is the worst of all possible worlds, so one of two things is happening:

  • I'm an idiot with bad opinions (very possibly!)
  • People like familiarity
@pesterhazy
pesterhazy / indexeddb-problems.md
Last active May 27, 2024 07:40
The pain and anguish of using IndexedDB: problems, bugs and oddities

This gist lists challenges you run into when building offline-first applications based on IndexedDB, including open-source libraries like Firebase, pouchdb and AWS amplify (more).

Note that some of the following issues affect only Safari. Out of the major browsers, Chrome's IndexedDB implementation is the best.

Backing file on disk (WAL file) keeps growing (Safari)

When this bug occurs, every time you use the indexeddb, the WAL file grows. Garbage collection doesn't seem to be working, so after a while, you end up with gigabytes of data.

Random exceptions when working with a large number of indexeddb databases (Safari)

@intrntbrn
intrntbrn / fancy_taglist.lua
Last active March 29, 2024 09:20
awesomewm fancy_taglist: a taglist that contains a tasklist for each tag
-- awesomewm fancy_taglist: a taglist that contains a tasklist for each tag.
-- Usage:
-- 1. Save as "fancy_taglist.lua" in ~/.config/awesome
-- 2. Add a fancy_taglist for every screen:
-- awful.screen.connect_for_each_screen(function(s)
-- ...
-- local fancy_taglist = require("fancy_taglist")
-- s.mytaglist = fancy_taglist.new({
-- screen = s,
@iul1an
iul1an / install.sh
Created June 17, 2020 19:10
install k3s with cilium CNI
#!/bin/bash
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC='--flannel-backend=none --no-flannel' sh -s - \
--disable-network-policy \
--disable "servicelb" \
--disable "traefik" \
--disable "metrics-server"
sudo cat /etc/rancher/k3s/k3s.yaml > ~/.kube/config
kubectl create -f https://raw.githubusercontent.com/cilium/cilium/v1.7/install/kubernetes/quick-install.yaml
@intrntbrn
intrntbrn / chromium_bookmarks
Created February 26, 2020 09:00
chromium bookmark menu (dmenu, rofi, fzf)
#!/bin/sh
# menu (dmenu, rofi, fzf, etc.)
menu_cmd='dmenu -i -p Bookmark'
# browser
browser_cmd='chromium'
# bookmarks json file
bookmarks=~/.config/chromium/Default/Bookmarks