Skip to content

Instantly share code, notes, and snippets.

View casjay's full-sized avatar
🎯
Learning, Self Discovery

casjay casjay

🎯
Learning, Self Discovery
View GitHub Profile
@casjay
casjay / cron-buildx.sh
Created September 3, 2023 16:27
cron script to build docker containers on a schedule
#!/usr/bin/env bash
# shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202309022354-git
# @@Author : Jason Hempstead
# @@Contact : git-admin@casjaysdev.pro
# @@License : WTFPL
# @@ReadME : cron-buildx --help
# @@Copyright : Copyright: (c) 2023 Jason Hempstead, Casjays Developments
# @@Created : Saturday, Sep 02, 2023 23:54 EDT
' ¯\\_(ツ)_/¯',
'"Get that shit outta my master."',
'#GrammarNazi',
'$(init 0)',
"$(rm -rvf .) - don't do this 😹",
'(\\ /)<br/>(O.o)<br/>(&gt; &lt;) Bunny approves these changes.',
'(c) Microsoft 1988',
'--help',
"-m \\'So I hear you like commits ...\\'",
'.',
@casjay
casjay / setup_kubero
Created April 19, 2023 00:53
setup_kubero
#!/usr/bin/env bash
# shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202304181752-git
# @@Author : Jason Hempstead
# @@Contact : jason@casjaysdev.com
# @@License : WTFPL
# @@ReadME : setup_kubero --help
# @@Copyright : Copyright: (c) 2023 Jason Hempstead, Casjays Developments
# @@Created : Tuesday, Apr 18, 2023 17:52 EDT
@casjay
casjay / dockerfile.sh
Created April 14, 2023 21:42
dockerfile script
#!/usr/bin/env bash
#shellcheck shell=bash
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
##@Version : 202211211129-git
# @@Author : Jason Hempstead
# @@Contact : git-admin@casjaysdev.com
# @@License : LICENSE.md
# @@ReadME : dockerfile.sh --help
# @@Copyright : Copyright: (c) 2022 Jason Hempstead, Casjays Developments
# @@Created : Monday, Nov 21, 2022 11:29 EST
@casjay
casjay / kubesphere
Last active April 3, 2023 00:37
Install kubesphere on debian
apt-get update
apt-get install -yy ca-certificates curl gnupg
mkdir -m 0755 -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
chmod a+r /etc/apt/keyrings/docker.gpg
apt-get update
@casjay
casjay / init.sh
Last active October 22, 2022 13:37
Debian to proxmox
#!/usr/bin/env bash
# - - - - - - - - - - - - - - - - - -
HOSTNAME="${HOSTNAME:-pve.local}"
SSH_KEY_ADDR="https://github.com/casjay.keys"
IP_ADDR="$(hostname -I | tr ' ' '\n' | grep '[0-9]\.[0-9]')"
SSH_KEY_AUTH="$(curl -q -LSsf "$SSH_KEY_ADDR" 2>/dev/null || echo '')"
# - - - - - - - - - - - - - - - - - -
if ! grep -Rqs 'eth0' "/etc/network"; then
printf '%s\n' "Add biosdevname=0 net.ifnames=0 to /etc/default/grub"
printf '%s\n' "And change network in /etc/network/interfaces to eth0"

Chromebook to Linux

https://superuser.com/questions/682010/chromebook-archlinux-install  
https://dbtechreviews.com/2018/09/how-to-install-ubuntu-on-chromebook-and-remove-chromeos/
@casjay
casjay / digitgrouping.bash
Created August 14, 2022 02:19
digit grouping
#DECIMALSEP='\.' # usa
DECIMALSEP=',' # europe
#THOUSSEP=',' # usa
#THOUSSEP='\.' # europe
#THOUSSEP='_' # underscore
#THOUSSEP=' ' # space
THOUSSEP=' ' # thinspace
# group before decimal separator
@casjay
casjay / distrofunctions.sh
Last active January 21, 2022 22:35
distiso_functions
#!/bin/bash
# Download functions and commands
wgetcmd () {
echo "Downloading $new to $output"
wget -q --show-progress -c "$new" -O "$output" -o /dev/null
}
# Function to only get filesize
@casjay
casjay / find_vars_in_file
Created August 15, 2020 23:35
find all variables in a shell script
awk '/[A-Za-z0-9]+=/ { gsub(/=.*/,"",$0); print $NF; }' filename