Skip to content

Instantly share code, notes, and snippets.

View trapier's full-sized avatar

Trapier Marshall trapier

  • Raleigh, NC USA
View GitHub Profile
@trapier
trapier / PrimitivePic_bg.30m.py
Last active September 23, 2019 17:15 — forked from teki/PrimitivePic_bg.30m.py
Use latest pic as background from https://twitter.com/PrimitivePic
#!/usr/bin/python
import os
import re
import subprocess
import tempfile
import time
import urllib.request
from pathlib import Path
TW_URL = 'https://twitter.com/PrimitivePic'
@trapier
trapier / gist:2b0e04590edd27e7544cb542a4737fd3
Created October 22, 2019 20:57 — forked from hgross/gist:26042d052f58feeb6d1b329e8dd2dfcc
Change docker_gwbridge subnet address
## Do this on each swarm-node
# store containers attached to the bridge
$ gwbridge_users=$(docker network inspect --format '{{range $key, $val := .Containers}} {{$key}}{{end}}' docker_gwbridge | \
$ xargs -d' ' -I {} -n1 docker ps --format {{.Names}} -f id={})
# stop all containers
# if you have stacks that restart automatically, remove them via docker stack <stackName> rm
$ echo "$gwbridge_users" | xargs docker stop
$ docker network rm docker_gwbridge
$ docker network disconnect -f docker_gwbridge gateway_ingress-sbox
@trapier
trapier / kube-on-linux-networking.txt
Last active August 15, 2020 17:43
kube on linux networking (created using http://asciiflow.com/)
+-----------------------------------------------------------------------------+
|CLIENT POD HOST |
| +---------------------------------------------+ |
+---------------+ | |CLIENT POD | |
|KUBEDNS | | | | |
| <-------------+ $ curl http://myservice:4000 | |
| | | srvc | | |
| myservice | | disc | $ grep nameserver /etc/resolv.conf | | ++ kubelet
| A 10.96.193.4 | | (DNS) | nameserver 10.96.0.10 | | ++ > svc cluster ip range:
| | | | | |
@trapier
trapier / fenix_fullscreen_triple_tap.user.js
Created February 10, 2024 20:27
firefox mobile triple tap for fullscreen
// ==UserScript==
// @name triple touch to fullscreen
// @namespace http://tampermonkey.net/
// @version 0.1
// @description triple touch to fullscreen for for mobile
// @author trapier
// @run-at document-end
// @match http(s)?://*/*
// @include http://*
// @include https://*