Skip to content

Instantly share code, notes, and snippets.

View wgwz's full-sized avatar
🌱

Kyle Lawlor-Bagcal wgwz

🌱
View GitHub Profile
import trio
import trio.testing
# A simple protocol where messages are single bytes b"a", b"b", b"c", etc.,
# and each one is acknowledged by echoing it back uppercased. So send b"a",
# get b"A", etc.
# To make it easier to shut down, message b"z" causes the receiver to exit.
async def receiver(stream):
@onlyphantom
onlyphantom / docker-volumes.md
Last active September 11, 2024 20:59
Demystifying Docker Volumes for Mac and PC Users

Demystifying Docker Volumes for Mac and PC Users

  1. Docker runs on a Linux kernel

Docker can be confusing to PC and Windows users because many tutorials on that topic assume you're using a Linux machine.

As a Linux user, you learn that Volumes are stored in a part of the host filesystem managed by Docker, and that is /var/lib/docker/volumes. When you're running Docker on a Windows or Mac OS machine, you will read the same documentation and instructions but feel frustrated as that path don't exist on your system. This simple note is my answer to that.

When you use Docker on a Windows PC, you're typically doing one of these two things:

  • Run Linux containers in a full Linux VM (what Docker typically does today)
@whophil
whophil / jupyter.service
Last active October 30, 2023 16:33 — forked from doowon/jupyter_systemd
A systemd script for running a Jupyter notebook server.
# After Ubuntu 16.04, Systemd becomes the default.
# It is simpler than https://gist.github.com/Doowon/38910829898a6624ce4ed554f082c4dd
[Unit]
Description=Jupyter Notebook
[Service]
Type=simple
PIDFile=/run/jupyter.pid
ExecStart=/home/phil/Enthought/Canopy_64bit/User/bin/jupyter-notebook --config=/home/phil/.jupyter/jupyter_notebook_config.py
@danielestevez
danielestevez / gist:2044589
Last active September 14, 2024 10:40
GIT Commit to an existing Tag
1) Create a branch with the tag
git branch {tagname}-branch {tagname}
git checkout {tagname}-branch
2) Include the fix manually if it's just a change ....
git add .
git ci -m "Fix included"
or cherry-pick the commit, whatever is easier
git cherry-pick {num_commit}