Skip to content

Instantly share code, notes, and snippets.

View shibumi's full-sized avatar

Christian Rebischke shibumi

View GitHub Profile
@therocco
therocco / stadia-4k-chrome.md
Last active January 5, 2021 04:48
Force 4K on Stadia

Force 4K VP9 Support in Browser (Chrome/Edge/Webkit)

If you don't want to install an extension to fore 4K VP9 support on Stadia on desktop you can copy and paste the following code into the Chrome Developer Console (ctrl+shift+j) before starting a game. This will tell your browser to use the VP9 codec as well as tricking your browser to load the 4K video stream for the game you are playing.

// set local codec to VP9
localStorage.setItem('video_codec_implementation_by_codec_key', '{"vp9":"ExternalDecoder"}');

// set 4k dimensions and screen values
let x = 3840;
@janeczku
janeczku / rancher-argocd.md
Created June 10, 2020 14:10
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy

variable "hcloud_token" {
}
provider "hcloud" {
token = "${var.hcloud_token}"
}
resource "hcloud_server" "kube-master" {
name = "kube-master"
image = "ubuntu-18.04"
@Zenithar
Zenithar / Caddyfile
Last active July 21, 2019 21:06
Hugo + Caddy + Webhook
0.0.0.0:2015
root blog.zenithar.org/public
ext .html
gzip
git github.com/zenithar/zenithar.hugo {
path ../
hook /_admin/github/hook/zenithar.org secret
@abtrout
abtrout / redis-pipe.md
Last active August 11, 2023 03:29
Bash script to prepare Redis commands for mass insertion via `redis-cli --pipe`

Redis supports mass insert via redis-cli --pipe, but commands need to be written in redis protocol. For more details, check out the Redis mass insertion page. This script takes care of converting ordinary redis commands to redis protocol.

#!/usr/bin/env bash

while read CMD; do
  # each command begins with *{number arguments in command}\r\n
  XS=($CMD); printf "*${#XS[@]}\r\n"
  # for each argument, we append ${length}\r\n{argument}\r\n
 for X in $CMD; do printf "\$${#X}\r\n$X\r\n"; done
@plentz
plentz / nginx.conf
Last active July 15, 2024 17:46
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@JamesTheBard
JamesTheBard / eventcmd
Created June 10, 2013 06:21
mcabber notification script
#!/bin/sh
echo "$1 $2 $3 $4" >> ~/test.mcabber.log
EVENT_TYPE=$1
EVENT_SUBTYPE=$2
JID=$3
FILE=$4
TITLE="Google Hangouts"
SOUND_FILE="$HOME/.mcabber/sounds/alert_47.wav"
ICON="$HOME/.mcabber/images/chat.png"
TIMEOUT=10000