Skip to content

Instantly share code, notes, and snippets.

@kolja
kolja / hack.css
Created April 8, 2020 11:12
aligning SVG bullet-image to <ul> list entries.
/* this is not the solution you are looking for. Move along */
ul {
list-style-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='40' viewBox='-1 -1 2 2'><circle transform='translate(0,-1.7)' r='1' /><circle transform='translate(0,0.95)' r='1' /></svg>");
line-height: 0.6rem;
}
@kolja
kolja / bookmark
Created June 28, 2020 08:36
babashka bookmark plugin for nnn
#!/usr/bin/env bb
; kolja (@01k) 2020
;
; usage:
;
; create a directory where you would like to keep your bookmarks.
; create an env variable NNN_BMDIR with the path to that directory (e.g. "~/.config/nnn/bookmarks")
; save this file in ~/.config/nnn/plugins as "bookmark" (for example)
;
@kolja
kolja / fizzbuzz.js
Created January 20, 2023 11:57
JavaScript FizzBuzz
// first naive, straight-forward solution:
function divides(a,b) {
return a % b === 0;
}
for (i=1; i<20; i++) {
if (divides(i,3) && divides(i,5)) {
console.log("fizzbuzz");
} else if (divides(i,3)) {