Skip to content

Instantly share code, notes, and snippets.

View bits0rcerer's full-sized avatar
🦀

bits0rcerer bits0rcerer

🦀
View GitHub Profile
// ==UserScript==
// @name rustdoc htmxify
// @version 0.1
// @description enhance rustdoc with a little bit of htmx
// @author bits0rcerer
// @match http://*/*
// @match https://*/*
// @icon data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
// @grant none
// ==/UserScript==
@bits0rcerer
bits0rcerer / docker-update-hosts
Last active January 12, 2022 09:49
Access docker container by name
#!/usr/bin/env bash
# /usr/local/bin/docker-update-hosts
# https://stackoverflow.com/questions/37242217/access-docker-container-from-host-using-containers-name/63656003#63656003
set -e -u -o pipefail
hosts_file=/etc/hosts
begin_block="# BEGIN DOCKER CONTAINERS"
end_block="# END DOCKER CONTAINERS"