Skip to content

Instantly share code, notes, and snippets.

View mmachenry's full-sized avatar

Mike MacHenry mmachenry

View GitHub Profile
@mmachenry
mmachenry / docker-compose.yaml
Last active October 16, 2024 19:12
Telegraf failing to recover after a network outage.
version: "3"
services:
influxdb:
image: influxdb:2.7.10 # influxdb:latest
ports:
- 8086:8086
volumes:
- influxdb-storage:/var/lib/influxdb2
ulimits:
nproc: 65535
@mmachenry
mmachenry / Dockerfile
Created March 18, 2020 22:07
How can I improve this Docker/Haskell build
# I like that this is very simple. Only two files, the Haskell code and the Dockerfile. But
# there are some issues that need to be addressed. They are mentioned in the comments.
FROM fpco/stack-build:lts-15.4 as haskell
WORKDIR /opt/build
COPY Main.hs /opt/build
# This reruns on every minor code change to Main.hs and takes forever
RUN stack ghc --package process -- Main.hs
# When this is scratch or alpine, I get the error: standard_init_linux.go:211: exec user process caused "no such file or directory"
#!/usr/bin/env stack
-- stack --resolver lts-15.1 script
main = putStrLn "Hello, World!"
{-
Using resolver: lts-15.1 specified on command line
Downloading lts-15.1 build plan ...
RedownloadInvalidResponse Request {
host = "raw.githubusercontent.com"
port = 443
-0.3529413335 -0.0323031051 9.78245699445 9.78887511023384
-0.2608176634 -0.040677984199999996 9.750153889349999 9.753726540043397
-0.26500510294999996 -0.03529413334999999 9.73699336505 9.74066287125605
-0.2584248408 -0.0502492746 9.773483909699998 9.77702900277508
-0.2620140747 -0.07058826669999999 9.739386187649998 9.74316567604822
-0.19322042494999997 -0.0263210486 9.714859756 9.716816711709942
-0.2644068973 -0.03170489945 9.798608546999999 9.80222656672097
-0.2009970984 -0.029910282499999996 9.700502820399999 9.702631056942893
-0.20219350969999997 -0.0394815729 9.7842516114 9.786420214008132
-0.21355941705 -0.035892338999999995 9.73340413115 9.735812850753526
import KnitParse
-- For the right side
cmd2Str cmd = case cmd of
K -> "|"
K2Tog -> "/"
K3Tog -> "/"
P -> "-"
P2Tog -> "/"
Slppsso -> "/"