Skip to content

Instantly share code, notes, and snippets.

@orange888
orange888 / add-preseed-and-firmware-to-debian.sh
Created November 10, 2020 22:42 — forked from kgrvamsi/add-preseed-and-firmware-to-debian.sh
Script to add firmware files and preseed file to a debian ISO
#!/bin/bash
# add-preseed-and-firmware-to-debian: Add non-free firmware and preseed to Debian install media
#
# Copyright (C) 2016-2017 Hedi Nasr <h.nsr69@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
@orange888
orange888 / zfs_cheatsheet.md
Created October 20, 2020 08:18 — forked from mrunkel/zfs_cheatsheet.md
My ZFS cheatsheet

ZFS commands cheatsheet

Devices and Pools

List all devices in the server

lsblk -S

List all pools

zpool list

@orange888
orange888 / build.sh
Created October 13, 2020 10:12 — forked from Forst/build.sh
Ubuntu ISO with preseed.cfg generation script
#!/bin/bash
## FORSTWOOF UBUNTU PRESEED :: BUILD SCRIPT
# Quit on first error
set -e
# Temporary directory for the build
TMP="/var/tmp/ubuntu-build"
@orange888
orange888 / create-cert-and-key-with-certbot.sh
Created October 9, 2020 06:09 — forked from arastu/create-cert-and-key-with-certbot.sh
Configuring Harbor with HTTPS Access via letsencrypt(certbot with --standalone flag)
sudo certbot certonly --standalone -d registry.example.com
@orange888
orange888 / create-cloud-template.sh
Created July 19, 2020 08:29 — forked from chriswayg/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@orange888
orange888 / firstboot.sh.erb
Created July 7, 2020 17:53 — forked from slattery/firstboot.sh.erb
Generator for Debian preseed files
#!/bin/sh
# set hostname
echo <%= hostname %> > /etc/hostname
/etc/init.d/hostname.sh
# Set up networking
cat > /etc/network/interfaces << EOF
# The loopback network interface
auto lo
@orange888
orange888 / install_nvidia_cuda_10_ubuntu18.sh
Created April 12, 2020 20:55 — forked from ksopyla/install_nvidia_cuda_ubuntu18.sh
NVidia Cuda 10 installation for Ubuntu 18.04
#!/bin/bash
## This gist contains step by step instructions to install cuda v10.0 and cudnn 7.5 in Ubuntu 18.04
## Clean install
### If you have previous installation remove it first.
sudo apt-get purge nvidia*
sudo apt remove nvidia-*
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt-get autoremove && sudo apt-get autoclean
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Hello! This gist goes with this video, which covers shortcuts and strategies for working with the K8s command line. You can see all of my videos on YouTube at https://adrian.goins.tv.

Scripts

I use Fish as my shell, but I know that a lot of people are using Bash. Here are two ways to concatenate config files for kubectl into the KUBECONFIG environment variable. If you're using zsh or tcsh you'll know how to convert these to your shell's format.

You can call these from your shell init file, or if you want to temporarily disable a script, append .bak or .disabled to its extension and run the script manually.

You can even hotkey it on something like the Elgato Stream Deck.