Skip to content

Instantly share code, notes, and snippets.

View bhpayne's full-sized avatar
💭
wandering in the wilderness

Ben bhpayne

💭
wandering in the wilderness
View GitHub Profile

For a great comparison, see https://tin6150.github.io/psg/blogger_container_hpc.html

Docker

privileged user running support daemon

Docker images are comprised of multiple layers managed by the Docker system

The docker daemon making calls to containerd, which in turn calls runc.

  • containerd is the new high-level daemon for image management
@bhpayne
bhpayne / markup_options.md
Last active April 18, 2021 14:52
survey of various markdown/markup formats

Criterion for inclusion: human readable. (which excludes ProtoBuf)

a key / value format where keys can (optionally) be grouped into sections.
cite

; last modified 1 April 2001 by John Doe
[owner]
#!/usr/bin/env python
from datetime import datetime
import os
"""
Much of the typical professional communication follows a script.
Therefore, we can use a script to generate the content.
This script implements a decision tree that gets presented
to the user as a sequence of prompts. The output of the
#!/usr/bin/env python3
"""
The arXiv RSS (https://arxiv.org/help/rss) is separate from
the arXiv API (https://arxiv.org/help/api/index)
The API supports /query
The RSS provides XML for a given topic
https://arxiv.org/help/robots
#!/usr/bin/env python3
"""
runs via crontab on a DigitalOcean VPS
the sendgrid API key is in a ".env" file
"""
# how to run this script:
# python3 hacker_news_rss_email_alerts.py
# thanks to https://dreampuf.github.io/GraphvizOnline
digraph G {
label="how to browse the internet"
labelloc = "t"; // place the label at the top (b seems to be default)
#concentrate=true; # edge overlap # https://stackoverflow.com/a/4671508/1164295
#overlap=false; # no effect
compound=true; # as per https://stackoverflow.com/a/2012106/1164295
# ovals are intended to be tangible activites;
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<thisdocument>
<process userobjective="turn on the computer">
<!-- https://www.quora.com/How-does-a-power-button-work-in-a-computer -->
<!-- https://wiki.osdev.org/System_Initialization_(x86) -->
<!-- https://wiki.osdev.org/System_Initialization_(x86) -->
<task entity="user" action="push power button">
<task entity="power button" action="electrical current running through wire is interrupted"></task>
<task entity="electrical wire" action="current goes to zero for short duration"></task>
<task entity="mother board" action="?"></task>
$ time python loop_with_delay.py
index = 0
index = 1
index = 2

real    0m6.202s
user    0m0.111s
sys     0m0.039s
@bhpayne
bhpayne / .block
Created June 4, 2020 11:59 — forked from XavierGimenez/.block
Grouping nodes in a Force-Directed Graph
license: gpl-3.0
height: 600
@bhpayne
bhpayne / index.html
Created May 25, 2020 23:01 — forked from d3noob/index.html
Range input with v4
<!DOCTYPE html>
<meta charset="utf-8">
<title>Input test (circle)</title>
<p>
<label for="nRadius"
style="display: inline-block; width: 240px; text-align: right">
radius = <span id="nRadius-value">…</span>
</label>
<input type="range" min="1" max="150" id="nRadius">