Skip to content

Instantly share code, notes, and snippets.

View Quelklef's full-sized avatar
🌷

maynard Quelklef

🌷
View GitHub Profile
{
environment.etc = {
# Utility scripts. Must be manually symlinked into /root
"my-scripts".source = let
scripts = [
{
"script-name.sh" = ''
echo 'script content';
'';
@Quelklef
Quelklef / nixos-install-with-opt-in-state.txt
Last active February 8, 2024 12:43
NixOS installation with opt-in state (darling erasure)
==================================
INSTALLING NIXOS WITH OPT-IN STATE
Based mostly on:
grahamc.com/blog/erase-your-darlings
gist.github.com/mx00s/ea2462a3fe6fdaa65692fe7ee824de3e
nixos.org/manual/nixos/stable/
@Quelklef
Quelklef / fizz-buzz.hs
Created April 26, 2022 21:27
Fizz Buzz
{-# LANGUAGE BlockArguments #-}
import Data.Foldable (for_)
import Data.Bifunctor (bimap, first)
fizzbuzz :: Int -> String
fizzbuzz n = (test 3 "fizz" . test 5 "buzz") id (show n)
where
test
@Quelklef
Quelklef / spotify-export-playlist.js
Created April 13, 2022 04:47
Export a Spotify playlist via the web app
/* USAGE: Go to Spotify page for playlist, copy+paste into console, scroll */
songs = {};
const songCnt = parseInt(document.querySelector('.ebHsEf.RANLXG3qKB61Bh33I0r2').textContent, 10);
console.log(songCnt + ' songs');
id = setInterval(function() {
const nodes = Array.from(document.querySelectorAll('.h4HgbO_Uu1JYg5UGANeQ.wTUruPetkKdWAR1dd6w4'));
import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk, Gdk, GObject, GLib
import cairo
import math
import io
import PIL.Image as Image
import random
@Quelklef
Quelklef / massive.md
Created March 24, 2021 02:22
Massive markdown file

200x300 image

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae condimentum orci, nec facilisis eros. Integer laoreet metus ac eros convallis vehicula. Duis ornare est et libero fermentum fermentum. Vivamus nec iaculis risus. Nulla erat urna, aliquet ac laoreet at, convallis eget nibh. Fusce nec porttitor sem. Nunc scelerisque dictum nisi, a pharetra urna egestas quis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.

200x300 image

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed vitae condimentum orci, nec facilisis eros. Integer laoreet metus ac eros convallis vehicula. Duis ornare est et libero fermentum fermentum. Vivamus nec iaculis risus. Nulla erat urna, aliquet ac laoreet at, convallis eget nibh. Fusce nec porttitor sem. Nunc scelerisque dictum nisi, a pharetra urna egestas quis. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac tur

@Quelklef
Quelklef / bf-derivative-list.md
Last active November 11, 2020 07:52
List of Brainfuck derivatives

(2020-11-10)

All are from the esolangs language list.

I may have missed some; I only looked through langs with 'brain' or 'fuck' in the name.

name key points
!!Fuck trivial substitution
( ͡° ͜ʖ ͡°)fuck trivial substitution
@Quelklef
Quelklef / render.js
Created April 2, 2020 08:49
Render some HTML
function render(html) {
/* Render a single element */
const template = document.createElement('template');
html = html.trim(); // Never return a text node of whitespace as the result
template.innerHTML = html;
return template.content.firstChild;
}
@Quelklef
Quelklef / quine.py3
Created February 11, 2020 19:13
My very first quine
s='s={}\ns=s.format(repr(s))\nprint(s)'
s=s.format(repr(s))
print(s)
-- Maps input string to leftover string
type Reg = String -> String
-- Literal match
lit :: String -> Reg
lit s (s ++ s') = s'
-- Optional; regex EXPR?
opt :: Reg -> Reg