Skip to content

Instantly share code, notes, and snippets.

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

Mik Szillat nomaster

🏳️‍🌈
Chaos Penguin
View GitHub Profile
@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 / 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 / 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 / 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 / netbox_inventory.yaml
Last active July 8, 2021 07:24
NetBox inventory for Ansible
---
plugin: netbox.netbox.nb_inventory
cache: True
cache_connection: .inventory
cache_plugin: jsonfile
plurals: False
group_by:
@nomaster
nomaster / dashboard.json
Created January 21, 2022 13:03
Quarkus HTTP Server RED Metrics from Prometheus in Grafana dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
@nomaster
nomaster / terrraform.tf
Created January 27, 2022 10:02
Kubernetes Nginx Ingress logfmt
resource "kubernetes_config_map" "config_map" {
name = "nginx-config"
namespace = "ingress"
data = <<EOF
log-format-upstream: >
latency=$upstream_response_time
protocol=$server_protocol
proxyAlternativeUpstreamName=$proxy_alternative_upstream_name
proxyUpstreamName=$proxy_upstream_name
referer=$http_referer
@nomaster
nomaster / output.txt
Last active April 28, 2022 07:11
Test NetBox API docs requests with curl
% curl -I -X GET -H "Content-Type: application/json" -H "Token: 62b24bdf9ce08cfa3fb7ed15aa0d3e027a142df1" https://demo.netbox.dev/api/docs/\?format\=openapi
HTTP/1.1 200 OK
Server: nginx/1.18.0 (Ubuntu)
Date: Thu, 28 Apr 2022 06:59:18 GMT
Content-Type: application/openapi+json; charset=utf-8
Content-Length: 1064721
Connection: keep-alive
Vary: Accept, Cookie, Authorization, Origin
Allow: GET, HEAD, OPTIONS
Expires: Thu, 28 Apr 2022 20:40:14 GMT
@nomaster
nomaster / dashboard.json
Created May 27, 2022 15:27
Grafana Dashboard for Kubernetes Pod Metrics and Logs
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,
@nomaster
nomaster / dashboard.json
Created June 8, 2022 12:16
Azure Application Insights dashboard for Grafana
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "grafana",
"uid": "-- Grafana --"
},
"enable": true,