Skip to content

Instantly share code, notes, and snippets.

@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
@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"
@MaxXor
MaxXor / btrfs-guide.md
Last active April 28, 2025 23:18
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
@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
@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.