Skip to content

Instantly share code, notes, and snippets.

View dargmuesli's full-sized avatar
🎧
https://creal.jonas-thelemann.de/player

Jonas Thelemann dargmuesli

🎧
https://creal.jonas-thelemann.de/player
View GitHub Profile
@dargmuesli
dargmuesli / Convert-AllFilesToUtf8.ps1
Created September 8, 2017 14:08
A PowerShell script to convert all files in the current folder to UTF-8.
<#
.SYNOPSIS
Outputs to a UTF-8-encoded file *without a BOM* (byte-order mark).
.DESCRIPTION
Mimics the most important aspects of Out-File:
* Input objects are sent to Out-String first.
* - Append allows you to append to an existing file, -NoClobber prevents
overwriting of an existing file.
* - Width allows you to specify the line width for the text representations
@dargmuesli
dargmuesli / FrameRateFix.bat
Created September 12, 2017 22:38
Variable frame rate fix for Geforce Experience's ShadowPlay recordings.
for %%i in (*.mp4) do (
ffmpeg -i "%%i" -c:v libx264 -preset ultrafast -crf 15 -c:a copy "%%~ni_ffmpeg.mp4"
)
@dargmuesli
dargmuesli / New-Certificates.ps1
Last active November 15, 2019 17:05
Updates self signed certificates for local development via HTTPs.
<#
.SYNOPSIS
Updates self signed certificates for local development via HTTPs.
.DESCRIPTION
Creates (or updates if needed) a root ca certificate for development and a
project certificate which is signed by the root certificate.
.PARAMETER ConfigPath
Path to server certificate configuration.
@dargmuesli
dargmuesli / new-certificates
Last active November 15, 2019 17:05
Updates self signed certificates for local development via HTTPs.
#!/bin/bash
#
# Updates self signed certificates for local development via HTTPs.
#
# Exit on errors, use last pipe error code, do not overwrite files, ensure
# variables exist
set -o errexit -o pipefail -o noclobber -o nounset
@dargmuesli
dargmuesli / hetzner-start.sh
Last active November 12, 2020 16:39
Initial setup script for Hetzner servers.
# Run
# wget https://gist.githubusercontent.com/dargmuesli/645a4d51ab1806ebfb3329fb05637318/raw -O hetzner-start.sh && chmod +x hetzner-start.sh && ./hetzner-start.sh
sudo apt-get update \
&& sudo apt-get -y dist-upgrade \
&& sudo apt-get -y install git vim
passwd
echo "username: "
read username
useradd -U -G users,sudo -m -s /bin/bash "$username"
@dargmuesli
dargmuesli / heuteheutemorgenmorgen.md
Last active November 27, 2023 10:42
A reference for sleep & time based wording issues.
verwirrend cool verwirrend cool

Keybase proof

I hereby claim:

  • I am dargmuesli on github.
  • I am dargmuesli (https://keybase.io/dargmuesli) on keybase.
  • I have a public key ASBwtIR5hr5ptYEqz_iJX0sDfbTEhLvlcPoJ_SncMQsojgo

To claim this, I am signing this object:

@dargmuesli
dargmuesli / docker-debian-amd64-start.sh
Last active March 27, 2023 19:08
Commands from Docker to install Docker on Debian (amd64).
# Run
# wget https://gist.githubusercontent.com/dargmuesli/58073a79a71f97e6bdd60d6cb93f207c/raw -O docker-debian-amd64-start.sh && chmod +x docker-debian-amd64-start.sh && ./docker-debian-amd64-start.sh
sudo apt-get update
sudo apt-get -y install \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
@dargmuesli
dargmuesli / portainer-start-local.sh
Last active May 9, 2024 21:32
Portainer Start Local
#!/bin/bash
docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
@dargmuesli
dargmuesli / deconflictor.sh
Last active November 18, 2022 12:49
Removes Syncthing sync conflicts that are exactly the same as their base files.
#!/bin/bash
set -o errexit -o pipefail -o noclobber -o nounset
LIGHT_BLUE='\e[94m'
LIGHT_GREEN='\e[92m'
LIGHT_RED='\e[91m'
LIGHT_YELLOW='\e[93m'
NC='\e[0m'