Skip to content

Instantly share code, notes, and snippets.

View ftischhauser's full-sized avatar

Flavio Tischhauser ftischhauser

  • Basel, Switzerland
View GitHub Profile
@ftischhauser
ftischhauser / DoVi_Check_Infuse_Compatibility.ps1
Last active May 28, 2024 17:40
DoVi_Check_Infuse_Compatibility.ps1
$fn = $args[0]
Start-Process -Wait -NoNewWindow 'cmd.exe' -ArgumentList "/C `"ffmpeg.exe -hide_banner -loglevel panic -i `"$fn`" -c:v copy -frames:v 1 -vbsf hevc_mp4toannexb -f hevc - | dovi_tool extract-rpu - -o `"$($fn).RPU.bin`"`""
Start-Process -Wait -NoNewWindow 'cmd.exe' -ArgumentList "/C `"dovi_tool.exe info `"$($fn).RPU.bin`" -f 0 > `"$($fn).RPU.json`"`""
$rpu = (Get-Content "$($fn).RPU.json" | Select-Object -Skip 1) | ConvertFrom-Json
if ($rpu.dovi_profile) {
Write-Output "Profile: $($rpu.dovi_profile)"
if ($rpu.dovi_profile -eq 5) {
Write-Output "Natively supported."
}
@ftischhauser
ftischhauser / extract-decisions.vm
Created February 6, 2020 10:07
Confluence-Extract-Decisions
#**
This Confluence user macro aggregates paragraphs marked with a custom keyword and section identifier from all child pages.
Usage:
- Insert the macro to the parent page and define the main keyword (e.g. "Decision").
- Change the default column headers to fit your use case.
- Mark the paragraphs using the following syntax: KEYWORD_SECTION: Lorem ipsum... (Important: The keyword must be followed by an underscore and section identifier plus a colon)
Note: Listing all children can be used to circument page restrictions: https://confluence.atlassian.com/doc/user-macro-template-syntax-223906130.html
This macro therefore only supports direct children of the page in which it is embedded and only pages without individual permission sets.
information:
@author Flavio Tischhauser <flavio.tischhauser@baloise.ch>
@ftischhauser
ftischhauser / wan-start
Created May 25, 2019 08:25
Asuswrt-Merlin fix IPv6 default gateway issue on RT-AX88U
#!/bin/sh
echo "1" > /proc/sys/net/ipv6/conf/eth0/accept_ra
@ftischhauser
ftischhauser / Nginx-blackhole
Last active May 12, 2017 18:29
Nginx as a blackhole server for PAC based ad blockers
server {
# Listen on port 9123. Change to your liking and remove 'deferred' if unsupported on your OS.
listen [::]:9123 ipv6only=off deferred;
# We don't need to log these proxy requests.
access_log off;
# Let browsers cache our responses.
expires max;
location / {
# Return an empty gif for all requests.
empty_gif;