Skip to content

Instantly share code, notes, and snippets.

View fentas's full-sized avatar
🐷
Oink.

Jan Guth fentas

🐷
Oink.
View GitHub Profile
@fentas
fentas / rke2-commands.md
Created February 15, 2021 09:39 — forked from superseb/rke2-commands.md
RKE2 / rancherd commands

RKE2 commands

Install

curl -sL https://get.rke2.io | sh
systemctl daemon-reload
systemctl start rke2-server
@fentas
fentas / export.js
Last active December 6, 2020 15:23
csv export for crypto.com exchange
// !SOURCE: https://www.reddit.com/r/Crypto_com/comments/jsa2kd/cryptocom_exchange_csv_exporter_bookmarklet/
// Thanks 🙌
// Execute in devtools when beeing on crypto.com/exchange
(function () {
var date = new Date();
var dateStr = date.getFullYear() + "-" + ("00" + (date.getMonth() + 1))
.slice(-2) + "-" + ("00" + date.getDate()).slice(-2) + " " + ("00" + date
.getHours()).slice(-2) + ":" + ("00" + date.getMinutes()).slice(-2) +
":" + ("00" + date.getSeconds()).slice(-2);
@fentas
fentas / main.go
Created May 26, 2020 07:10
♻ Endless running goroutine. Restart process if it fails. Manage multiple processes.
package main
import (
"log"
// replace right path
"[...]/utils"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
@fentas
fentas / cattle.yaml
Last active March 5, 2022 20:19 — forked from syntaqx/cloud-init.yaml
cloud init to install docker on ubuntu
#cloud-config
package_update: true
package_upgrade: true
package_reboot_if_required: true
disable_root: 1
ssh_pwauth: 0
manage-resolv-conf: true
@fentas
fentas / .bash_aliases
Created July 4, 2019 07:27 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@fentas
fentas / .bash_aliases
Created July 4, 2019 07:27 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
apiVersion: v1
kind: Namespace
metadata:
labels:
app.kubernetes.io/managed-by: kustomize
app.kubernetes.io/stage: localism
istio-injection: enabled
name: project
---
apiVersion: v1
@fentas
fentas / i3bar-ws-spacing.patch
Created February 17, 2019 21:06 — forked from Airblader/i3bar-ws-spacing.patch
Remove padding around i3bar contents
diff --git a/i3bar/src/xcb.c b/i3bar/src/xcb.c
index 6878e29..ced03c6 100644
--- a/i3bar/src/xcb.c
+++ b/i3bar/src/xcb.c
@@ -129,11 +129,11 @@ static const int ws_hoff_px = 4;
static const int ws_voff_px = 3;
/* Offset between two workspace buttons */
-static const int ws_spacing_px = 1;
+static const int ws_spacing_px = 0;
@fentas
fentas / check-input-method.sh
Created February 15, 2019 16:24
checks how input is redirected into shell script
#!/bin/sh
if file "$(readlink /proc/$$/fd/0)" | grep -q "character special"; then
echo "Standard input:"
elif readlink /proc/$$/fd/0 | grep -q "^pipe:"; then
echo "Pipe input:"
else
echo "File input:"
fi
@fentas
fentas / unsplash
Created February 12, 2019 10:33
random unsplash wallpaper
#!/bin/sh
ids=(
"1111575" # space
"176" # unsplash
"562095" # Wilderness Artifacts
"164" # Brevitē
"151749" # Follow Me
"397770" # Coffee House
)