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 / 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
@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 / bash_iniparse.sh
Created January 24, 2019 16:59 — forked from splaspood/bash_iniparse.sh
Parsing INI Files with Bash
cfg.parser () {
fixed_file=$(cat $1 | sed 's/ = /=/g') # fix ' = ' to be '='
IFS=$'\n' && ini=( $fixed_file ) # convert to line-array
ini=( ${ini[*]//;*/} ) # remove comments
ini=( ${ini[*]/#[/\}$'\n'cfg.section.} ) # set section prefix
ini=( ${ini[*]/%]/ \(} ) # convert text2function (1)
ini=( ${ini[*]/=/=\( } ) # convert item to array
ini=( ${ini[*]/%/ \)} ) # close array parenthesis
ini=( ${ini[*]/%\( \)/\(\) \{} ) # convert text2function (2)
ini=( ${ini[*]/%\} \)/\}} ) # remove extra parenthesis
@fentas
fentas / console
Created May 21, 2018 13:15 — forked from dmitriy-kiriyenko/console
Init.d to start/stop xvfb. Put it into /etc/init.d and chmod it to 755
apt-get install xvfb
apt-get install firefox
@fentas
fentas / tcpproxy.js
Created April 13, 2018 13:09 — forked from kfox/tcpproxy.js
A basic TCP proxy written in node.js
var net = require("net");
process.on("uncaughtException", function(error) {
console.error(error);
});
if (process.argv.length != 5) {
console.log("usage: %s <localport> <remotehost> <remoteport>", process.argv[1]);
process.exit();
}
@fentas
fentas / public_pem_to_openssh.go
Created February 15, 2018 20:33 — forked from sriramsa/public_pem_to_openssh.go
Golang: Convert Public key PEM bytes to Open SSH format
const (
samplePEMKeyA = `
-----BEGIN PUBLIC KEY-----
MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApIBaVZ8A6HraVxIVGEU+
psJx8S4nFQQykrJ751aicMUNFYThT/tl5Gvvl4H9eimB06iNf4zqnrvKwgtCYjFp
a5rJoaSxA675FBzYpzsHeygnPkt98mFGLRS6SJdNhvuE5QT6ostiLBufdpIyvSUP
cKdwL7ti8QyX3v8Lm7JrJ+DiGW8y3XYWm5kzlHdbah3DB2z2xh9+sQ1orXcxFTf7
CzVmfoTTO+QkeeTz/HG0gRu+EH1cxkMKP/BS8qOrFBFGWt3B/Vv0/lG4AILag+Dn
x4FfMxhlPtIXW4eUc5/SGaNHarJVN4y6mz4I3NvL3abMAWqpX1U9p/iO5kMLlFQX
qQIDAQAB
@fentas
fentas / update_canary.sh
Created July 27, 2017 12:26 — forked from tifletcher/update_canary.sh
chrome canary for linux
#!/bin/bash
#
# Update to latest chromium nightly on linux
# Script requires root to properly set up the sandbox
# https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment
#
# I use it with a line like the following in my .bashrc:
# alias canary='CHROME_DEVEL_SANDBOX="/home/tif/bin/chrome-linux/chrome_sandbox" /home/tif/bin/chrome-linux/chrome-wrapper'
#
# ----------------------------------------------------------------------