Skip to content

Instantly share code, notes, and snippets.

View mark-kubacki's full-sized avatar
🎏

Mark Kubacki mark-kubacki

🎏
  • Germany, European Union
View GitHub Profile
@mark-kubacki
mark-kubacki / make_proxies.ps1
Last active October 27, 2024 21:00
make Proxies for video cutting in Davinci Resolve
Param(
$outdir
)
function Show-Notification {
[CmdletBinding()]
Param (
[string] $Title,
[string] [parameter(ValueFromPipeline)] $Text
)
@mark-kubacki
mark-kubacki / Discord.desktop
Created August 11, 2022 17:36
Container Discord and its update script
# .local/share/applications/Discord.desktop
[Desktop Entry]
Name=Discord Chat
Icon=/opt/Discord/discord.png
StartupWMClass=discord
Comment=Discord Chat
Exec=sudo /usr/bin/systemctl start [email protected]
Terminal=false
Type=Application
Categories=Network;InstantMessaging;
@mark-kubacki
mark-kubacki / Dockerfile
Last active September 23, 2021 10:34
Windows in Docker
# Image meant to host Windows in QEMU, hence we install QEMU
# and everything that is needed to get the networking for it working.
FROM ubuntu:latest
RUN apt-get -q update \
&& apt-get -y install \
kvm qemu-kvm bridge-utils psmisc \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN update-alternatives --install /usr/bin/qemu qemu /usr/bin/qemu-system-x86_64-spice 10
@mark-kubacki
mark-kubacki / record-cam.service
Created September 21, 2021 13:32
webcam to gpu encoding
[Unit]
Description=Local surveillance using the webcam
Requisite=pulseaudio.service
[Service]
WorkingDirectory=%h/Aufnahmen
# Might want to skip restarting if all you need are the first 2h.
Restart=on-success
TimeoutStopSec=10s
ExecStart=%h/record-cam.sh vaapi
@mark-kubacki
mark-kubacki / scw-server-notifier.go
Last active September 21, 2023 08:02
notify me to running servers on Scaleway
package main
import (
"fmt"
"os"
notify "github.com/TheCreeper/go-notify"
instance "github.com/scaleway/scaleway-sdk-go/api/instance/v1"
"github.com/scaleway/scaleway-sdk-go/scw"
yaml "gopkg.in/yaml.v3"
@mark-kubacki
mark-kubacki / default.pa
Last active September 20, 2020 22:55
mpv config
#!/usr/bin/pulseaudio -nF
# This is: .config/pulse/default.pa
load-module module-alsa-card device_id="1" name="pci-0000_04_00.6" card_name="alsa_card.pci-0000_04_00.6" namereg_fail=false ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1" tsched=no fixed_latency_range=yes fragments=32 fragment_size=128
set-sink-volume 0 32768
.include /etc/pulse/default.pa
# Default devices. `pacmd list-sinks` and `… list-sources` lists them.
.nofail
@mark-kubacki
mark-kubacki / storage-counter.go
Last active May 4, 2020 23:02
count bytes per storage class
package main
import (
"context"
"io"
"log"
"net/url"
"os"
"strings"
 --- /usr/share/X11/xkb/symbols/de.orig 2020-03-08 18:18:54.650875969 +0100
+++ /usr/share/X11/xkb/symbols/de 2020-03-08 18:29:08.506129310 +0100
@@ -37,6 +37,9 @@
key <AB10> { [ minus, underscore, endash, emdash ] };
key <LSGT> { [ less, greater, bar, dead_belowmacron ] };
+ // space, nobreakspace, thin non-break space, thin space
+ key <SPCE> { [ space, nobreakspace, U202F, thinspace ] };
+
include "kpdl(comma)"
@mark-kubacki
mark-kubacki / merge-repos.sh
Last active April 6, 2021 21:57
Collect a set of repositories, each in its own subdir, into one mono-repo.
#!/bin/bash
# Merges a set of repositories, the “sources”, formerly hosted on “from”
# into subdirectories of one repository
# meant to be moved to a new repository hosting provider.
#
# git version: 2.24.0
# Mark Kubacki, 2020-01-08
if (( $# < 1 )); then
>&2 printf "Usage: $0 [repo | repo…]\n"
@mark-kubacki
mark-kubacki / update-go.sh
Last active June 14, 2023 14:56
Updates your local Golang to the latest stable version
#!/bin/bash
# Will update your Golang.
# Needs: curl tar jq procps-ng/pgrep
set -eupo pipefail
if [[ -t 1 ]] && type -p 'tput' &>/dev/null && tput colors >&/dev/null; then
V_BOLD_RED=$(tput bold; tput setaf 1)
V_BOLD_GREEN=$(tput bold; tput setaf 2)
V_VIDOFF=$(tput sgr0)
else