Skip to content

Instantly share code, notes, and snippets.

View nomaster's full-sized avatar
🏳️‍🌈
Chaos Penguin

Mic Szillat nomaster

🏳️‍🌈
Chaos Penguin
View GitHub Profile
@nomaster
nomaster / import-checks.py
Created May 18, 2021 08:47
Import Pingdom checks from API to Terraform
#!/usr/bin/env python3
import pingdomv3
import subprocess
import os
pingdom_api_token = os.environ['PINGDOM_API_TOKEN']
client = pingdomv3.Client(pingdom_api_token)
checks = client.get_checks(tags="environment_test")
@nomaster
nomaster / vlan24.conflist
Created April 27, 2021 09:50
Podman network on existing bridge interface
{
"cniVersion": "0.4.0",
"name": "vlan24",
"plugins": [
{
"type": "bridge",
"bridge": "br24",
"ipam": {
"type": "static",
"routes": [
@nomaster
nomaster / terraform-run-all.py
Created April 13, 2021 07:40
Run all Terraform workspaces matching name by string
#!/usr/bin/env python3
import pyterprise
import os
tfe_token = os.environ.get('TFE_TOKEN')
tfe_org = os.environ.get('TFE_ORG')
client = pyterprise.Client()
client.init(token=tfe_token, url="https://app.terraform.io")
@nomaster
nomaster / Chromecast.xml
Last active December 18, 2020 18:46
Chromecast Ultra with Plex Media Server
<?xml version="1.0" encoding="utf-8"?>
<Client name="Chromecast">
<TranscodeTargets>
<VideoProfile protocol="http" container="mkv" codec="h264,hevc" audioCodec="eac3,ac3" subtitleFormat="ass,srt" context="streaming"/>
<SubtitleProfile container="ass" codec="ass" context="all" />
</TranscodeTargets>
<DirectPlayProfiles>
<VideoProfile container="mp4" codec="hevc,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="eac3,ac3,mp3,mp2"/>
<VideoProfile container="mkv" codec="vp9,hevc,mpeg1video,mpeg2video,h264,mpeg4" audioCodec="eac3,ac3,mp3,mp2,pcm,flac,alac,truehd" subtitleFormat="ass,srt"/>
<MusicProfile container="mp3" codec="mp2,mp3"/>
@nomaster
nomaster / sip-communicator.properties
Created September 13, 2020 20:14
Jitsi Meet Stats
org.jitsi.videobridge.ENABLE_STATISTICS=true
org.jitsi.videobridge.STATISTICS_INTERVAL=1000
org.jitsi.videobridge.STATISTICS_TRANSPORT=muc,colibri,pubsub
org.jitsi.videobridge.rest.private.jetty.port=8080
org.jitsi.videobridge.rest.private.jetty.host=0.0.0.0
@nomaster
nomaster / config.properties
Created August 30, 2020 11:19
Client Isolation on UniFi wireless access points
config.system_cfg.1=wireless.1.l2_isolation=enabled
config.system_cfg.2=wireless.2.l2_isolation=enabled
config.system_cfg.3=wireless.3.l2_isolation=enabled
config.system_cfg.4=wireless.4.l2_isolation=enabled
@nomaster
nomaster / gist:def275fd7edcef43228cd6e5aae9828c
Last active July 10, 2020 21:25
Enable IPv6 on Cisco IOS
# logon to the device
enable
configure
sdm prefer dual-ipv4-and-ipv6 default
exit
reload
# logon again
enable
configure
@nomaster
nomaster / scapy3
Last active April 17, 2020 17:26
Test raw traffic towards UDP port 10000
send(IP(dst="45.151.166.22")/UDP(dport=10000)/Raw(load="Test4"))
send(IPv6(dst="2001:678:b7c::22")/UDP(dport=10000)/Raw(load="Test6"))
@nomaster
nomaster / socat@.service
Created April 4, 2020 10:53
Use socat to translate TCP6 to TCP4
[Unit]
Description=socat
After=network.target
[Service]
Type=simple
ExecStart=/usr/bin/socat TCP6-LISTEN:%i,reuseaddr,fork,bind=[::] TCP4:127.0.0.1:%i
Restart=on-abort
[Install]
@nomaster
nomaster / certbot.service
Last active March 20, 2020 08:44
systemd service for certbot
[Unit]
Description=Renew Let's Encrypt certificates
[Service]
Type=oneshot
ExecStart=/usr/local/sbin/certbot-auto renew
ExecStartPost=/usr/bin/systemctl reload nginx.service