Skip to content

Instantly share code, notes, and snippets.

View JanKoppe's full-sized avatar
🐧
NOOT NOOT!

Jan Koppe JanKoppe

🐧
NOOT NOOT!
View GitHub Profile
TF_LOG=DEBUG tf apply
2023-06-12T08:44:15.341+0200 [INFO] Terraform version: 1.4.6
2023-06-12T08:44:15.341+0200 [DEBUG] using github.com/hashicorp/go-tfe v1.21.0
2023-06-12T08:44:15.341+0200 [DEBUG] using github.com/hashicorp/hcl/v2 v2.16.2
2023-06-12T08:44:15.341+0200 [DEBUG] using github.com/hashicorp/terraform-config-inspect v0.0.0-20210209133302-4fd17a0faac2
2023-06-12T08:44:15.341+0200 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.0
2023-06-12T08:44:15.341+0200 [DEBUG] using github.com/zclconf/go-cty v1.12.1
2023-06-12T08:44:15.341+0200 [INFO] Go runtime version: go1.19.6
2023-06-12T08:44:15.341+0200 [INFO] CLI args: []string{"/home/j/.asdf/installs/terraform/1.4.6/bin/terraform", "apply"}
2023-06-12T08:44:15.341+0200 [DEBUG] Attempting to open CLI config file: /home/j/.terraformrc
@JanKoppe
JanKoppe / README.md
Created January 24, 2021 13:11
Flashing Draytek Vigor130 when it's bricked

We have had a bricked Vigor130, which would not reset. We were unable to reach it even after resetting multiple times.

It was pingable on 192.168.1.1, but did not reply to any open ports with nmap scans, nor did it act as a dhcp server.

We connected a TTL adapter to the 4 pins on the board to see if there's a serial console on it.

Pinout:

                         |
+3.3v | RX | TX | GND |
@JanKoppe
JanKoppe / mactab
Created October 12, 2016 20:14
Persistent network device naming with Alpine Linux
#/etc/mactab
---
lan0 00:11:22:33:44:01
wan0 00:11:22:33:44:02
@JanKoppe
JanKoppe / README.md
Last active December 4, 2020 03:58
nginx basic auth with different users for read/write

This nginx configuration allows to restrict access via different methods to separate users.

This is very useful for private docker registries, where you want every member of your team to be able to fetch Docker images, but only some users (admins and CI users) to push new images to the registry.

Example:

  • User write can use GET, POST, PUT, DELETE and everything else.
  • User read can only use GET and HEAD.
  • Anonymous users are denied access entirely.
@JanKoppe
JanKoppe / example.js
Created August 4, 2016 10:20
Passport.js and ORCiD.org
/*
* Example for authenticationg against the ORCiD.org Public API with
* passport.js and retrieving the authenticated orcid.
*
* The main difficulty is that ORCiD.org will send the authenticated orcid
* in the accessToken request, which is normally not passed on to the
* passport.js-callback. Without the orcid, properly authenticating with
* ORCiD.org is impossible though.
*
* The trick is to pass on the `passReqToCallback`-option to the
$ LIBVA_DRIVER_NAME=i965 ffmpeg -y -init_hw_device qsv=hw -filter_hw_device hw -f decklink -i 'DeckLink Quad HDMI Recorder (1)' -vf hwupload=extra_hw_frames=64,format=qsv -c:v h264_qsv -b:v 5M output.mp4
ffmpeg version 4.3.1 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 10.2.0 (GCC)
configuration: --prefix=/usr --disable-debug --disable-static --disable-stripping --enable-avisynth --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libdav1d --enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libiec61883 --enable-libjack --enable-libmfx --enable-libmodplug --enable-libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librav1e --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvpx --e
@JanKoppe
JanKoppe / DesktopVideoUpdateTool
Last active October 19, 2020 12:48
ffmpeg-no-decklink-sources
# DesktopVideoUpdateTool -la
Available Devices:
* DeckLink Quad HDMI Recorder (Gc0272b0)
Firmware is up to date
@JanKoppe
JanKoppe / gist:96dc92564f223e86e21e28a66523518b
Last active April 15, 2020 12:28
ugly POC to get billable seconds per project for a gitlab runner from the api
import gitlab
from datetime import datetime, timedelta
import dateutil.parser
import pytz
import pprint
import os
BILLING_PERIOD_DAYS=7
@JanKoppe
JanKoppe / README.md
Last active December 9, 2019 11:59
36C3: Pretalx XML filter out track
@JanKoppe
JanKoppe / 1001.conf
Created July 2, 2019 08:24 — forked from blha303/1001.conf
Asterisk 1.0.0.1 context
[1001]
exten => _X.,1,Set(CALLERID(name)=1.0.0.1)
exten => _X.,n,Answer
exten => _X.,n,Wait(1)
exten => _X.,n,Playback(1001-recordtype) ; "Enter record type on your phone keypad, followed by the hash key. Press 1 to go to next character"
exten => _X.,n,Read(recordtype,,,si,)
exten => _X.,n,Playback(1001-domain) ; "Enter domain name to retrieve record, followed by the hash key"
exten => _X.,n,Read(domain,,,si,)
exten => _X.,n,Set(RECORD="${SHELL(/usr/bin/1001.py "${recordtype}")}")
exten => _X.,n,Set(ADDR="${SHELL(/usr/bin/1001.py "${domain}")}")