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
$ 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 / 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
@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 / 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
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 |
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