Skip to content

Instantly share code, notes, and snippets.

View KiaraGrouwstra's full-sized avatar
💁‍♀️

Kiara Grouwstra KiaraGrouwstra

💁‍♀️
  • BIJ1
  • Utrecht, the Netherlands
  • 13:59 (UTC +02:00)
View GitHub Profile
@KiaraGrouwstra
KiaraGrouwstra / ecosia-vim.user.js
Last active May 5, 2024 01:46
*monkey userscript: DDG-like Vim keybindings for Ecosia
// ==UserScript==
// @name DDG-like Vim keybindings for Ecosia
// @namespace https://gist.github.com/KiaraGrouwstra/f5d319a89d0c21ebcdae94f68b6bf604
// @version 0.0.4
// @description plants trees while navigating search results by keyboard!
// @author KiaraGrouwstra
// @match https://www.ecosia.org/search?*
// @match https://html.duckduckgo.com/*
// @grant none
// @esversion 6
@KiaraGrouwstra
KiaraGrouwstra / brave-search-vim.user.js
Last active May 5, 2024 01:43
DDG-like Vim keybindings for Brave Search
// ==UserScript==
// @name DDG-like Vim keybindings for Brave Search
// @namespace https://gist.github.com/KiaraGrouwstra/94c77deb4ba1ac7c464568bb9a895b76
// @version 0.0.3
// @description navigate search results by keyboard!
// @author KiaraGrouwstra
// @match https://search.brave.com/*
// @grant none
// @license WTFPL
// ==/UserScript==
@KiaraGrouwstra
KiaraGrouwstra / bisect-nix.md
Last active April 22, 2024 06:53
debugging nix builds using git bisect

System flake

git bisect start $BAD $GOOD && git bisect run $CMD

nixpkgs package

either:

  • nix-bisect: smartly pick bisect bad/skip in automated bisects and give nicer outputs
@KiaraGrouwstra
KiaraGrouwstra / doxc-to-md.csv
Created March 31, 2024 20:12
docx to markdown
intent replace regex with
debold headers # +\*\*(.*)\*\* # $1
de-underline links \[<u>(.*)</u>\] [$1]
de-underline links \[<u>([\n\s\S]*?)</u>\] [$1]
remove empty comments <!-- -→\n+
ditch quote blocks ^(\s*)> ? $1
upgrade bolded lines to h2 (\[?)\*\*(.*)\*\* ## $1$2
normalize quotes '
normalize quotes '
normalize quotes
@KiaraGrouwstra
KiaraGrouwstra / config
Created March 31, 2024 15:06
kanshi config
profile lid_closed {
output HDMI-A-1 enable
}
profile undocked {
output eDP-1 enable
}
profile home_office {
output HDMI-A-1 enable mode 1366x768@60Hz position 0,0
# If a config.py file exists, this file is ignored unless it's explicitly loaded
# via config.load_autoconfig(). For more information, see:
# https://github.com/qutebrowser/qutebrowser/blob/main/doc/help/configuring.asciidoc#loading-autoconfigyml
# DO NOT edit this file by hand, qutebrowser will overwrite it.
# Instead, create a config.py - see :help for details.
config_version: 2
settings:
bindings.commands:
global:
@KiaraGrouwstra
KiaraGrouwstra / hcl2nix.sh
Last active January 25, 2024 23:07
hcl2nix.sh
#!/usr/bin/env sh
# usage: cat my-file.hcl | ./hcl2nix.sh > my-file.nix
cat << EOF
{
$(sed -E 's/\}$/};/g' \
| sed -E 's/\]$/];/g' \
| sed -E 's/= (.*[^\[\{])$/= \1;/g' \
| sed -E 's/ \{/ = {/g' \
| sed -E 's/^(\w+) "/\1."/g' \
| sed -E 's/" "/"."/g' \
@KiaraGrouwstra
KiaraGrouwstra / cmc.js
Last active November 27, 2023 20:58
transform crypto-currency data for GDocs
// go to https://coinmarketcap.com/exchanges/volume/24-hour/
// make a `require` bookmarklet with the following content:
// javascript:(function(){var body=document.getElementsByTagName('body')[0];var script=document.createElement('script');script.type='text/javascript';script.src='https://s3.amazonaws.com/s3.mathisonian.com/javascripts/requirify-browser.js';body.appendChild(script);})();
// run rest in console:
require('R', 'ramda');
e = document.getElementsByTagName('table')[0].children[0].children;
trs = [].slice.call(e);
@KiaraGrouwstra
KiaraGrouwstra / clear.sh
Last active August 28, 2023 13:59
arch disk space
# sudo du -h --max-depth=1 / | sort --human-numeric-sort -r
# nix commands, sudo in case of global nix install
sudo nix-collect-garbage
sudo nix store optimise
# nixos: nix-du
yay -Sc
sudo pacman -Sc
@KiaraGrouwstra
KiaraGrouwstra / voting-advice.md
Last active July 19, 2023 18:05
data-backed voting advice