Skip to content

Instantly share code, notes, and snippets.

View phillijw's full-sized avatar
🐌
Reading the yellow pages

Joe Phillips phillijw

🐌
Reading the yellow pages
View GitHub Profile
@phillijw
phillijw / gist:7bd65f26803e1f4dc5f881285816d1e3
Created April 8, 2017 02:50
Williams Top-Vent Gravity Wall Furnace won't turn on (Model 2509622A)
Problem: Burners won't light even though pilot stays lit
Solution: Reset the vent-limit switch (it turns burners off when it gets too hot)
I have a Williams brand wall furnace that was recently installed. Lately it has been not kicking on automatically when the temperature drops. I've scoured the internet and noticed that other people have had the same issue. The pilot is lit, the thermostat is set properly, but it still does not kick on. At first I thought this was due to a loose connection but ultimately what I noticed is that at the top of the unit behind the side vents, there is a "vent-limit switch". This is essentially a switch that turns the burners off if it overheats. The pilot remains lit when this happens. There is a tiny red button that you need to push to reset this switch each time this happens. Luckily you can fit a letter opener or something thin between the side vent slats to reset this button if this happens. The odd thing is that this seems to happen when we lower the temperature so the fu
@phillijw
phillijw / gist:6f35778a0dcde5b839158cee2d74521b
Last active January 22, 2022 03:35
transmission (bittorrent)
docker run \
-d \
-v /var/lib/docker/volumes/transmission/config:/config \
-v /media/kingkong:/downloads \
-v /media/kingkong/torrents:/watch \
-e TZ=America/Chicago \
-p 9091:9091 -p 51413:51413 \
-p 51413:51413/udp \
--name=transmission \
--restart unless-stopped \
@phillijw
phillijw / sample.py
Last active April 13, 2021 18:26 — forked from nottug/sample.py
Coinigy API v2 Signature and Request Example in Python 3
import time
import hmac
import hashlib
import requests
BASE_URL = 'https://api.coinigy.com'
ENDPOINT = '/api/v2/private/exchanges'
X_API_KEY = 'your_api_v2_key_goes_here'
SECRET = 'your_corresponding_api_v2_secret_goes_here'
METHOD = 'GET'
docker run \
-p 139:139 \
-p 445:445 \
-e TZ=CST6CDT \
-v /media/kingkong:/mount/kingkong \
-d \
--name samba \
--restart unless-stopped \
dperson/samba \
-s "kingkong;/mount/kingkong"
@phillijw
phillijw / gist:cf1de972df08ae37fc9ae980c00fd730
Created February 25, 2021 14:39
Coinigy v2 API Authentication for Postman
// Pre-request script for private Coinigy endpoints (requiring authentication and authorization)
// This function is used for variable replacement in URLs. It finds the curly braces
// and replaces with the corresponding variable
function interpolate (str) {
return str.replace(/{{([^}]+)}}/g, function (match, $1) {
return pm.variables.get($1);
});
}
@phillijw
phillijw / traefik-docker-compose.yml
Last active January 28, 2021 19:08
Working traefik + zoneminder docker setup
version: '3'
services:
traefik:
image: traefik
restart: always
ports:
- "80:80" #http
- "443:443" #https
- "8080:8080" #web ui
@phillijw
phillijw / gist:d8466359efd41e75425c70d138eaecb7
Created August 6, 2020 19:52
Docker health checks for services
```
healthcheck:
test: ["CMD-SHELL", "[ $$(expr $$(date +%s) - $$(stat -c '%Y' \"/app/health_check\")) -lt 60 ] || exit 1"
interval: 60s
timeout: 5s
retries: 3
```
This checks the last modified date of a file `/app/health_check` which the service should update
whenever it wants to mark itself as "alive". This command will check that it was updated in the
last 60 seconds and exit with a zero code. If its more than 60 seconds, it will exit with 1.
@phillijw
phillijw / Dockerfile
Last active August 5, 2020 19:16
Getting diagnostic tools to work in swarm
#File: dotnet-tools/Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 as tools
RUN dotnet tool install --tool-path /tools dotnet-trace
RUN dotnet tool install --tool-path /tools dotnet-dump
RUN dotnet tool install --tool-path /tools dotnet-counters
FROM mcr.microsoft.com/dotnet/core/runtime:3.1 AS runtime
COPY --from=tools /tools /tools
Calling "git cleanup" will delete local branches that have already been merged into origin/master. It skips master, staging, and dev because we don't want to delete those in normal circumstances.
$ git config --global alias.cleanup '!git branch --merged origin/master | egrep -v "(^\*|master|staging|dev)" | xargs git branch -d'
@phillijw
phillijw / gist:d520f1c3fe10b348dd1b9fb94803a5ca
Last active February 2, 2019 21:09
Setup for Wansview K2 cam in Zoneminder
Zoneminder setup for webcams:
Wansview K2 =================
Source Type: Ffmpeg
Source Path: rtsp://user:password@ipaddress:554/live/ch0
Remote Method: TCP
Shengzen X Series =================