Skip to content

Instantly share code, notes, and snippets.

@djmaze
djmaze / gastherme.yml
Created November 28, 2022 22:47
ESPHome-Config, um einen Gaszähler per Reed-Kontakt auszulesen
globals:
- id: total_pulses
type: int
restore_value: true
initial_value: '0' # startet mit 0
- id: imp_ratio
type: float
restore_value: false
initial_value: '0.01' # vom Gaszaehler
- id: Zustandszahl
@djmaze
djmaze / OrbitTest.vue
Last active December 19, 2021 17:22
Using OrbitDB as a reactive store with VueJS
<template>
<div>
<button @click="addItem('wut')">count is: {{ count }}</button>
<div
v-for="result in results"
:key="result.id"
@click="removeItem(result.id)"
>
{{ result.id }}
@djmaze
djmaze / Dockerfile
Created October 11, 2019 21:46
Restic compile error with Go 1.13
FROM golang:1.13.1-buster
ARG RESTIC_VERSION=0.9.5
ARG RESTIC_SHA256=e22208e946ede07f56ef60c1c89de817b453967663ce4867628dff77761bd429
RUN curl -sL -o restic.tar.gz https://github.com/restic/restic/releases/download/v${RESTIC_VERSION}/restic-${RESTIC_VERSION}.tar.gz \
&& echo "${RESTIC_SHA256} restic.tar.gz" | sha256sum -c - \
&& tar xzf restic.tar.gz \
&& cd restic-${RESTIC_VERSION} \
&& go run build.go \
@djmaze
djmaze / docker-compose.yml
Created June 4, 2018 22:06 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@djmaze
djmaze / README.md
Last active May 5, 2021 09:35
Boosting Docker performance on OSX via NFS mounts

Run the script from this post in order to set up NFS:

curl -sL https://gist.githubusercontent.com/seanhandley/7dad300420e5f8f02e7243b7651c6657/raw/fdd77fe66cf9ce893fa0175d735cbede2bb065e4/setup_native_nfs_docker_osx.sh >/tmp/setup_native_nfs_docker_osx.sh 
bash /tmp/setup_native_nfs_docker_osx.sh
rm /tmp/setup_native_nfs_docker_osx.sh

Copy the supplied docker-compose.override.yml to your project directory. Adjust the version (version), service name (app) and the app path (/usr/src/app) according to the app service definition in your existing docker-compose.yml.

@djmaze
djmaze / traefik.yml
Created January 17, 2018 23:22
Traefik loadbalancer for a local dev environment (via Docker Compose)
version: "3.3"
services:
traefik:
image: traefik:1.4
command:
- --docker
- --docker.watch
- --docker.exposedbydefault=false
- --web
@djmaze
djmaze / traefik.yml
Created January 17, 2018 22:58
Traefik loadbalancer running on Docker swarm (w/ Let's Encrypt)
version: "3.3"
services:
traefik:
image: traefik:1.5.0-rc5
command:
- --docker
- --docker.swarmmode
- --docker.watch
- --web
- --web.readonly
@djmaze
djmaze / update.sh
Last active September 10, 2018 12:01 — forked from t413/update.sh
manage a OpenWRT LetsEncrypt https instalation
#!/usr/bin/env sh
## update.sh - manage a OpenWRT LetsEncrypt https instalation
# HOWTO:
# - put update.sh in its own directory /root/.acme.sh
# - run ./update.sh your.domain.com (that domain needs to point to your router)
# * this get an issued cert from letsencrypt.org using the webroot verification method
# * also installs curl and ca-certificates packages
# - use crontab -e; add the line `0 0 * * * "/root/.acme.sh/update.sh" >>/root/.https/log.txt 2>&`
# * this runs the update every day, logging everything to log.txt
#
@djmaze
djmaze / docker-compose.yml
Last active November 23, 2022 16:35
Use docker-ssh-agent-forward with Docker Compose
version: '3'
services:
app:
image: gcea/ssh-client
environment:
SSH_AUTH_SOCK: /ssh-agent/ssh-agent.sock
volumes:
- ssh-agent:/ssh-agent
@djmaze
djmaze / docker-compose.yml
Created September 19, 2016 22:03
Using an ssh-agent container in conjunction with docker-compose
# This compose file mounts an SSH agent socket from the named volume "ssh" into a Ruby container.
# The SSH_AUTH_SOCK variable is set so everything just works.
app:
image: ruby
volumes:
- ssh:/ssh
environment:
SSH_AUTH_SOCK: /ssh/auth/sock