Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
class PngIconConverter | |
{ | |
/* input image with width = height is suggested to get the best result */ | |
/* png support in icon was introduced in Windows Vista */ | |
public static bool Convert(System.IO.Stream input_stream, System.IO.Stream output_stream, int size, bool keep_aspect_ratio = false) | |
{ | |
System.Drawing.Bitmap input_bit = (System.Drawing.Bitmap)System.Drawing.Bitmap.FromStream(input_stream); | |
if (input_bit != null) | |
{ | |
int width, height; |
# Sample Nginx config with sane caching settings for modern web development | |
# | |
# Motivation: | |
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools. | |
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh | |
# and juicy version of your assets available. | |
# At some point, however, you want to show your work to testers, your boss or your client. | |
# After you implemented and deployed their feedback, they reload the testing page – and report | |
# the exact same issues as before! What happened? Of course, they did not have developer tools | |
# open, and of course, they did not empty their caches before navigating to your site. |
Export your public key:
keybase pgp export > keybase-public.key
Export your private key:
keybase pgp export --secret > keybase-private.key
# Change your BungeeCord configuration to enable PROXY Protocol. | |
listeners: | |
- host: 0.0.0.0:25577 | |
proxy_protocol: true |
Ever wanted to put your Rapsberry Pi cluster to great use? Our team is working remotely, so we started to play Minecraft. I decided I would host the Minecraft server on my Raspberry Pi cluster. This gist will guide you through the steps I took to get a k3s cluster up with k3sup and later installed Minecraft as well as metrics exporter and Prometheus Operator
Quoniam Possumus - Because we can
#!/bin/bash | |
############################################################################ | |
# This script simply formats a block device and mounts it to the data | |
# directory in a very safe manner by checking that the block device is | |
# completely empty | |
# | |
############################################################################ | |
set -eu | |
if [ $# -ne 2 ] |
# Check these threads before proceeding: | |
# https://github.com/microsoft/WSL/discussions/5857 | |
# https://github.com/microsoft/WSL/issues/5821 | |
if (-Not ([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] 'Administrator')) { | |
$CmdLine = "-File `"" + $MyInvocation.MyCommand.Path + "`" " + $MyInvocation.UnboundArguments | |
Start-Process -FilePath PowerShell.exe -Verb Runas -ArgumentList $CmdLine | |
Exit | |
} | |
# Restart the Host Network Service | |
Restart-Service -Force -Name hns |
@echo off | |
setlocal EnableDelayedExpansion | |
for %%a in (*.webm *.mkv) do ( | |
FOR /F "usebackq" %%F IN (`ffprobe -v error -select_streams v:0 -show_entries stream^=codec_name -of default^=noprint_wrappers^=1:nokey^=1 "%%a"`) DO ( | |
if "%%F"=="vp8" ( | |
ffmpeg -hide_banner -c:v libvpx -i "%%a" -pix_fmt rgba -c:v rawvideo -c:a aac -q:a 5 "%%~dpna_RAWVIDEO.avi" | |
) else ( | |
if "%%F"=="vp9" ( | |
ffmpeg -hide_banner -c:v libvpx-vp9 -i "%%a" -pix_fmt rgba -c:v rawvideo -c:a aac -q:a 5 "%%~dpna_RAWVIDEO.avi" |
@echo off | |
setlocal EnableDelayedExpansion | |
for %%a in (*.webm *.mkv) do ( | |
FOR /F "usebackq" %%F IN (`ffprobe -v error -select_streams v:0 -show_entries stream^=codec_name -of default^=noprint_wrappers^=1:nokey^=1 "%%a"`) DO ( | |
if "%%F"=="vp8" ( | |
ffmpeg -hide_banner -c:v libvpx -i "%%a" -pix_fmt yuva420p -c:v libvpx-vp9 -crf 0 -b:v 0 -lossless 1 -row-mt 1 -tile-columns 6 -tile-rows 2 -frame-parallel 1 -c:a libopus -b:a 96k "%%~dpna_VP9.webm" | |
) else ( | |
if "%%F"=="vp9" ( | |
ffmpeg -hide_banner -c:v libvpx-vp9 -i "%%a" -pix_fmt yuva420p -c:v libvpx-vp9 -crf 0 -b:v 0 -lossless 1 -row-mt 1 -tile-columns 6 -tile-rows 2 -frame-parallel 1 -c:a libopus -b:a 96k "%%~dpna_VP9.webm" |
@echo off | |
setlocal EnableDelayedExpansion | |
for %%a in (*.webm *.mkv) do ( | |
FOR /F "usebackq" %%F IN (`ffprobe -v error -select_streams v:0 -show_entries stream^=codec_name -of default^=noprint_wrappers^=1:nokey^=1 "%%a"`) DO ( | |
if "%%F"=="vp8" ( | |
ffmpeg -hide_banner -c:v libvpx -i "%%a" -c:v prores_ks -pix_fmt yuva444p10le -profile:v 4444xq -quant_mat hq -c:a aac -q:a 5 "%%~dpna_PRORES.mov" | |
) else ( | |
if "%%F"=="vp9" ( | |
ffmpeg -hide_banner -c:v libvpx-vp9 -i "%%a" -c:v prores_ks -pix_fmt yuva444p10le -profile:v 4444xq -quant_mat hq -c:a aac -q:a 5 "%%~dpna_PRORES.mov" |