Skip to content

Instantly share code, notes, and snippets.

View bougyman's full-sized avatar

bougyman bougyman

View GitHub Profile
@bougyman
bougyman / gist:5737053038056d075915fc80ce11f5a0
Created April 20, 2022 17:37
Ruby to calculate total number of bitcoins that will be generated.
coin = 100_000_000
init_subsidy = 50 * coin
it = (0..).inject(0) do |total, height|
puts "Height is #{height}, total is #{total / coin.to_f}"
break total if (sub = (init_subsidy >> height)) == 0
total += sub * 210000
end
puts it / coin.to_f
Ingredients:
Chuck roast (marbled as much as possible)
One white onion (chopped)
2 celery stalks (chopped)
3 carrots (rough chop)
1 tablespoon of tomato paste
3 tablespoons of flour (give or take)
1 teaspoon of minced garlic
1 1/2 cups of your favorite dry red wine (something you would drink)
% buildah bud -v $PWD:/build/fuse-overlayfs -t fuse-overlayfs -f ./Dockerfile.static.fedora .
STEP 1: FROM registry.fedoraproject.org/fedora:latest
Getting image source signatures
Copying blob sha256:dd9f43919ba05f05d4f783c31e83e5e776c4f5d29dd72b9ec5056b9576c10053
67.28 MiB / 67.28 MiB [====================================================] 4s
Copying config sha256:00ff39a8bf19f810a7e641f7eb3ddc47635913a19c4996debd91fafb6b379069
1.29 KiB / 1.29 KiB [======================================================] 0s
Writing manifest to image destination
Storing signatures
ERRO[0005] Error while applying layer: ApplyLayer exit status 1 stdout: stderr: mkdir /opt: permission denied
% gnome-terminal
^CTraceback (most recent call last):
File "/usr/bin/gnome-terminal", line 109, in <module>
main()
File "/usr/bin/gnome-terminal", line 100, in main
GnomeTerminal(sys.argv[:], mainloop)
File "/usr/bin/gnome-terminal", line 84, in __init__
sys.exit(subprocess.call(self.args))
File "/usr/lib/python3.8/subprocess.py", line 342, in call
return p.wait(timeout=timeout)
@bougyman
bougyman / gist:0ff5d69b36d956e2b04d9035417d1f4d
Created July 17, 2020 18:57
Linux Distribution Containers
% docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
bougyman/voidlinux musl-ruby-tiny 14d4f8d1fdb9 36 hours ago 28.7MB
bougyman/voidlinux glibc-locales-tiny 6e070dc23418 3 days ago 19.1MB
bougyman/voidlinux glibc-tiny ae1f39ef3978 3 days ago 14.3MB
bougyman/voidlinux musl-tmux-tiny f3bb167a932f 3 days ago 11.1MB
bougyman/voidlinux musl-tiny fd8806b1a24e 3 days ago 8.12MB
bougyman/voidlinux latest b08cede60143 3 days ago 14.3MB
bougyman/voidlinux tmux 5b6ac4fc2fdb 3 days ago 22MB
bougyman/voidlinux musl-tmux 7fcac12252d8 3 days ago 27.8MB
% svls; sudo svls 03:11:49
Listing All Services
run: /home/bougyman/service/bot: (pid 14904) 780911s; run: log: (pid 744) 1478289s
Listing All Services
run: /var/service/agetty-tty1: (pid 712) 1478289s
run: /var/service/agetty-tty2: (pid 711) 1478289s
run: /var/service/agetty-tty3: (pid 713) 1478289s
run: /var/service/agetty-tty4: (pid 705) 1478289s
run: /var/service/agetty-tty5: (pid 687) 1478289s
run: /var/service/agetty-tty6: (pid 698) 1478289s
% date ; docker images
Mon Jul 13 21:33:36 CDT 2020
REPOSITORY TAG IMAGE ID CREATED SIZE
bougyman/voidlinux glibc-locales-tiny 6e070dc23418 About an hour ago 19.1MB
bougyman/voidlinux glibc-tiny ae1f39ef3978 About an hour ago 14.3MB
bougyman/voidlinux musl-tmux-tiny f3bb167a932f About an hour ago 11.1MB
bougyman/voidlinux musl-tiny fd8806b1a24e About an hour ago 8.12MB
bougyman/voidlinux latest b08cede60143 2 hours ago 14.3MB
bougyman/voidlinux tmux 5b6ac4fc2fdb 2 hours ago 22MB
bougyman/voidlinux musl-tmux 7fcac12252d8 2 hours ago 27.8MB
/home/tvanderpoel/.local/share/containers/storage/overlay/e4865f01c3032eedc18dbfa2f17273c960468c12e35423341f723864dc8fa5a2/merged
e65214830300f6918b11b40033c4e048868d1ab3ee255b4ad1faa09e06f0cd91
Generating GNU libc locales...
en_US.UTF-8... done.
en_US.ISO-8859-1... done.
glibc-locales: configuring ...
glibc-locales: configured successfully.
Creating system directories/symlinks...
Registered /usr/bin/sh into /etc/shells.
Registered /usr/bin/dash into /etc/shells.
Name Action Version New version Download size
runit-void remove 20190906_3 - -
gawk remove 5.1.0_1 - -
base-minimal remove 0.2_1 - -
Size freed on disk: 4203KB
Space available on disk: 198GB
Transaction failed! see above for errors.
{
"3000/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "32817"
}
],
"3001/tcp": [
{
"HostIp": "0.0.0.0",