Skip to content

Instantly share code, notes, and snippets.

@opencoca
opencoca / update-hosts.sh
Created June 18, 2023 18:05 — forked from jamshid/update-hosts.sh
Docker environment hack, to put the names of running containers in /etc/hosts
#!/bin/bash
# An alternative to "links", run this script after starting or stopping any
# container. It's a hack to update the host machine (vagrant) /etc/hosts with
# the current active docker containers and tell dnsmasq to refresh.
#
# Then start each machine with "-dns ${DOCKER_HOST_IP}", e.g.
# $ docker run -d -name mycontainer1 -dns 10.0.3.1 MYPRODUCT
# You can't seem to set the DNS during "docker build".
#
# Diagnostic command to run in host or while logged into containers:
@opencoca
opencoca / APAstyle
Created September 18, 2022 23:02 — forked from pdparker/APAstyle
APA Style for Markdown
/* I have only tested this on Chrome but it
prints nicely to A4 size */
@media print {
body {
width: 210mm;
height: 297mm;
}
}
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>capture microphone audio into buffer</title>
</head>
<body>
<audio id="player" controls></audio>
<input
type="text"
id="username"