Skip to content

Instantly share code, notes, and snippets.

@torvalds
torvalds / gist:6faadce34c56d53b2d5352da0c3cd093
Last active August 2, 2025 18:05
Not involved with any fishy crypto fishy business
I'm told that there are people claiming to "tokenize" my git repositories with my approval.
I just want to clarify that that is not the case. I do not believe in monetizing my repositories.
If you believe crypto-currencies are anything but a scam, I have a bridge to sell you.
But I'm not selling source code.
@NPCollaborator
NPCollaborator / Segment Concentration Risk
Created February 28, 2025 06:12
Segment Concentration Risk
Segment Concentration Risk
Nonprofit fundraising is often heavily skewed toward a small number of large donors. Sector-wide data show an extreme Pareto distribution: for example, donors giving over $5,000 represented only about 1.8% of the donor pool but contributed roughly 73% of all donation dollars in early 2023​ nonprofitpro.com
. Conversely, micro donors (<$100) and small donors ($101–$500) made up over 88% of donors but only around 10% of total contributions​
nonprofitpro.com
nonprofitpro.com
. This imbalance means many organizations are highly reliant on mid-level and major donors, raising concerns about financial stability if those donors reduce or cease giving. Recent trends have exacerbated this risk: overall donor counts have been declining (especially among small donors), even as total dollars have risen due to big gifts. In 2022, the number of donors dropped over 7%, driven largely by steep declines in small donors, while total fundraising dollars increased ~6%, buoyed by major gifts​
nonprofit
@braindevices
braindevices / #btrfs benchmark for daily used desktop OS
Last active August 1, 2025 07:23
which file sytem to use for daily work? should we turn on btrfs compression?
#btrfs benchmark for daily used desktop OS
@pmarreck
pmarreck / coinflip.bash
Created February 9, 2022 23:40
Simplest way to simulate a coin flip or toss on the Linux command line (in Bash; may work in other shells)
# return code is either 0 (success) or 1 (fail), so you can use it straight-up in logical statements
coinflip() { return $(($RANDOM%2)); }
coinflip && echo "heads" || echo "tails"
@ryuheechul
ryuheechul / windows.md
Last active July 2, 2025 09:41
Let that Windows 10/11 be a bit friendlier

An attempt to make Windows 10/11 work for me by customizing/personalizing it

Why gist not dotfiles?

I use dotfiles to personalize *nix type of machines. But I'm new to personalizing Windows 10. So I'm collecting information here first before adding these to the dotfiles. I'm not sure if these will ever move to dotfiles though.

Enable WSL2

@MaxXor
MaxXor / btrfs-guide.md
Last active July 31, 2025 00:17
Btrfs guide to set up an LUKS-encrypted btrfs raid volume with included maintenance & recovery guide

Encrypted Btrfs storage setup and maintenance guide

Initial setup with LUKS/dm-crypt

This exemplary initial setup uses two devices /dev/sdb and /dev/sdc but can be applied to any amount of devices by following the steps with additional devices.

Create keyfile:

dd bs=64 count=1 if=/dev/urandom of=/etc/cryptkey iflag=fullblock
chmod 600 /etc/cryptkey
@Brainiarc7
Brainiarc7 / ffmpeg-gnu-parallel-snippets.md
Last active June 19, 2025 15:25
Some snippets you can quickly adapt for use with FFmpeg and GNU Parallel for use for standard tasks.

Useful Examples of ffmpeg and GNU parallel on the command-line:

Transcoding FLAC music to Opus:

ffmpeg is a highly useful application for converting music and videos. However, audio transcoding is limited to a a single core. If you have a large FLAC archive and you wanted to compress it into the efficient Opus codec, it would take forever with the fastest processor to complete, unless you were to take advantage of all cores in your CPU.

parallel 'ffmpeg -v 0 -i "{}" -c:a libopus -b:a 128k "{.}.opus"' ::: $(find -type f -name '*.flac')

Transcoding Videos to VP9:

@daniel-j-h
daniel-j-h / pgo.sh
Last active February 14, 2025 07:28
pgo: profile guided optimization with gcc
# Instrument binaries, pgo data to /data/pgo, serial make is important to not confuse the pgo generator
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-generate=/data/pgo' cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 1
# Run instrumented program, generate and write pgo data
./runIt
# Use profile data and feed into gcc, correct for threading counter noise, serial make is important to not confuse the pgo generator
env CXXFLAGS='-march=native -fprofile-dir=/data/pgo -fprofile-use=/data/pgo -fprofile-correction' cmake .. -DCMAKE_BUILD_TYPE=Release
make -j 1
@ghedo
ghedo / sound_playback.c
Last active July 30, 2025 23:22
Simple sound playback using ALSA API and libasound
/*
* Simple sound playback using ALSA API and libasound.
*
* Compile:
* $ cc -o play sound_playback.c -lasound
*
* Usage:
* $ ./play <sample_rate> <channels> <seconds> < <file>
*
* Examples:
@schacon
schacon / gist:1
Created July 15, 2008 18:17
the meaning of gist
This is gist.
There are many like it, but this one is mine.
It is my life.
I must master it as I must master my life.
Without me gist is useless.
Without gist, I am useless.