Skip to content

Instantly share code, notes, and snippets.

View chwzr's full-sized avatar
🍋

Felix Koppe chwzr

🍋
View GitHub Profile
@chwzr
chwzr / bookmarklet
Last active April 25, 2022 06:45
Fount - Identify Fonts
javascript:(function(){if(!document.getElementById('fountscript')){var founts=document.createElement('script');founts.src='https://gistcdn.githack.com/chwzr/25067d19533d65f89e1efb694b40dd05/raw/b1c62cef05e9cd52a42d76ec6b09ba686c9db581/fount.js';founts.id='fountscript';document.body.appendChild(founts);}})();
@chwzr
chwzr / zfs-k3s.sh
Created August 30, 2021 09:24
Run k3s on host with zfs filesystem. Run this script after installing k3s, then restart k3s service
# echo "[+] making sure everything in containerd is empty to let it mount"
rm -rf /var/lib/rancher/k3s/agent/containerd/*
# echo "[+] create the k3s hierarchy"
zfs create rpool/k3s
zfs create -s -V 128GB rpool/k3s/containerd
# echo "[+] wait for the newly created volume to format"
mkfs.ext4 /dev/rpool/k3s/containerd
# echo "[+] adding the mount to fstab"
echo "/dev/rpool/k3s/containerd /var/lib/rancher/k3s/agent/containerd ext4 auto 0 0" > /etc/fstab
# echo "[+] manually mounting the volume to the specific mount point"
@chwzr
chwzr / setup-k3s-on-hetzner.sh
Created May 17, 2020 11:26 — forked from alexanderkjeldaas/setup-k3s-on-hetzner.sh
Setup k3s on Hetzner with CSI drivers
#!/bin/bash
LOCATION=${HCLOUD_LOCATION:-nbg1-dc3}
if [ -z "$HCLOUD_TOKEN" ]; then
echo "You need to set HCLOUD_TOKEN to an Hetzner API token!";
exit 1
fi
if [ -z "$SSH_KEY" ]; then
@chwzr
chwzr / index.html
Created January 14, 2020 19:24
Pixel Repulsion
<canvas></canvas>
<img src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/128966/img_repulsion.jpg' alt='' crossorigin="anonymous">
@chwzr
chwzr / wget.sh
Created November 15, 2018 09:17 — forked from crittermike/wget.sh
Download an entire website with wget, along with assets.
wget \
--recursive \ # Download the whole site.
--no-clobber \ # Don't overwrite existing files.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.
--restrict-file-names=windows \ # Modify filenames to work in Windows as well.
--domains yoursite.com \ # Do not follow links outside this domain.
--no-parent \ # Don't follow links outside the directory you pass in.
@chwzr
chwzr / CAME.ino
Created September 4, 2018 09:12 — forked from superyarik/CAME.ino
#define pinRX 2
#define pinTX 8
#define CM_MAX_TE 450
#define CM_MIN_TE 250
#define CM_BITS12 12
#define CM_BITS24 24
#define Te 320
volatile byte level = 255;
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 468 232" style="enable-background:new 0 0 468 232;" xml:space="preserve">
<style type="text/css">
.st0{fill:#29357D;}
.st1{display:none;}
.st2{display:inline;}
.st3{fill:none;}
</style>
@chwzr
chwzr / index.html
Created May 1, 2018 15:08
Masonry - imagesLoaded progress, vanilla JS
<h1>Masonry - imagesLoaded progress, vanilla JS</h1>
<div class="grid">
<div class="grid-sizer"></div>
<div class="grid-item">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/orange-tree.jpg" />
</div>
<div class="grid-item">
<img src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/82/submerged.jpg" />
</div>