Skip to content

Instantly share code, notes, and snippets.

@butuzov
butuzov / mp3 to m4b.md
Created August 10, 2018 06:07
Convert mp3's to m4b using `ffmpeg`

Let's imagine we have a lot of mp3 files ( forexample one of the pluralsite courses converted to mp3 ).

URL=https://www.pluralsight.com/courses/run-effective-meetings
PASS=pass
USER=user
OUTPUT="%(playlist_index)s. %(title)s-%(id)s.%(ext)s"
youtube-dl --username $USER --password $PASS -o $OUTPUT --extract-audio --audio-format mp3 $URL
@ole
ole / let.swift
Created September 9, 2019 15:14
A replacement for let bindings in Swift function builders
import SwiftUI
func `let`<Value, Return>(_ expression: Value, body: (Value) -> Return) -> Return {
body(expression)
}
struct ContentView: View {
var body: some View {
GeometryReader { geometry in
`let`(geometry.size.width / 2) { lineWidth in
@passsy
passsy / README.md
Last active February 24, 2025 18:30
How to use xrechnung-visualization

How to use xrechnung-visualization

1. Install Ant

Install brew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

Then install ant using brew

@jmatsushita
jmatsushita / README
Last active October 29, 2025 09:57
Setup nix, nix-darwin and home-manager from scratch on an M1 Macbook Pro
###
### [2023-06-19] UPDATE: Just tried to use my instructions again on a fresh install and it failed in a number of places.
###. Not sure if I'll update this gist (though I realise it seems to still have some traffic), but here's a list of
###. things to watch out for:
### - Check out the `nix-darwin` instructions, as they have changed.
### - There's a home manager gotcha https://github.com/nix-community/home-manager/issues/4026
###
# I found some good resources but they seem to do a bit too much (maybe from a time when there were more bugs).
# So here's a minimal Gist which worked for me as an install on a new M1 Pro.
@huytd
huytd / wordle.md
Last active October 29, 2025 21:41
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@baryluk
baryluk / plan9-run.sh
Last active July 28, 2025 15:52
Plan 9 in qemu / 9front in qemu
#!/bin/bash
wget -c https://9front.org/iso/9front-9442.0e66f87316e571f7edf5274369ec69a5905507aa.amd64.iso.gz
gunzip -k 9front-9442.0e66f87316e571f7edf5274369ec69a5905507aa.amd64.iso.gz
if ! [ -f plan9.raw ]; then
qemu-img create plan9.raw 10G
fi
exec qemu-system-x86_64 -enable-kvm \
-smp $(nproc) \
-m $((8*1024)) \
@fikovnik
fikovnik / make-audiobook.sh
Created June 16, 2024 18:38
Create a m4b file from mp3 files with metadata and image cover (tailored for audioteka.cz)
#!/bin/bash -x
CATEGORY="audioteka"
function get_mp3_tag() {
local file="$1"
local tag="$2"
ffprobe -v error -show_entries format_tags="$tag" -of default=noprint_wrappers=1:nokey=1 "$file"
}