Skip to content

Instantly share code, notes, and snippets.

helmOperator:
create: false
git:
url: "git@github.com:lovellfelix/homelab-k3s.git"
branch: master
path: deployments
image:
repository: raspbernetes/flux
tag: 1.18.0
registry:
@lovellfelix
lovellfelix / healthcheck.js
Created July 17, 2020 16:03 — forked from PatrickKalkman/healthcheck.js
Healthcheck cmd
const http = require('http');
const config = require('./config');
const log = require('./log');
const constants = require('./constants');
const options = {
host: 'localhost',
port: config.httpPort,
timeout: 2000,
method: 'GET',
@lovellfelix
lovellfelix / healthcheck.js
Created July 17, 2020 16:03 — forked from PatrickKalkman/healthcheck.js
Healthcheck cmd
const http = require('http');
const config = require('./config');
const log = require('./log');
const constants = require('./constants');
const options = {
host: 'localhost',
port: config.httpPort,
timeout: 2000,
method: 'GET',
@lovellfelix
lovellfelix / config.txt
Last active May 21, 2021 23:22
Raspberry Pi helpers
#enable arm 64 and set graphic memory
gpu_mem=16
arm_64bit=1
#!/bin/sh
errorExit() {
echo "*** $*" 1>&2
exit 1
}
curl --silent --max-time 2 --insecure https://localhost:6443/ -o /dev/null || errorExit "Error GET https://localhost:6443/"
if ip addr | grep -q VIRTUAL_IP; then
curl --silent --max-time 2 --insecure https://VIRTUAL_IP:6443/ -o /dev/null || errorExit "Error GET https://VIRTUAL_IP:6443/"
#Verfiy opensssl is installed
rpm -qa | grep -i openssl
#If it's not installed
yum install openssl openssl-devel
#Generate RSA key
openssl genrsa -out domain.com.key 2048
#Create CSR
 git config --global http.sslVerify false
 ``
@lovellfelix
lovellfelix / git-reset-author.sh
Created September 27, 2018 16:20 — forked from bgromov/git-reset-author.sh
Git: reset author for ALL commits
#!/bin/sh
# Credits: http://stackoverflow.com/a/750191
git filter-branch -f --env-filter "
GIT_AUTHOR_NAME='Newname'
GIT_AUTHOR_EMAIL='new@email'
GIT_COMMITTER_NAME='Newname'
GIT_COMMITTER_EMAIL='new@email'
" HEAD
@lovellfelix
lovellfelix / tree.sh
Created August 24, 2018 18:05
Print directory Tree
#!/bin/bash
#
#
#
#
ls -R `pwd` | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'
#!/bin/sh
# variables for vault name, timestamp, and output file
VAULT="sandbox-02"
NOW=$(date +%s)
IDFILE="archive-ids-${NOW}.json"
# make sure we can write the output file
touch $IDFILE || exit 1
# upload all tar files in forbackup directory, writing