Skip to content

Instantly share code, notes, and snippets.

View bgulla's full-sized avatar
🦃
fast and loose is still fast.

Brandon bgulla

🦃
fast and loose is still fast.
  • Rancher Federal
  • Virginia
View GitHub Profile
@uzl
uzl / nvidia_driver_install_ubuntu_18.md
Last active April 30, 2022 13:04
Install Latest Nvidia Driver in Ubuntu 18.04

Install Latest Nvidia Driver in Ubuntu 18.04 LTS

Step: 1

Remove previous installation

sudo apt-get purge nvidia*
sudo apt-get autoremove 

@bgulla
bgulla / jetson_nano_cheatsheet.md
Last active September 5, 2022 21:29
Notes related to the NVIDIA Jetson Nano dev kit

Jetson Nano Cheatsheet

image text

Below are my personal notes related to the Nvidia Jetson Nano Dev-board.

Performance Management

Nvidia allows your to fine tune the performance of your Jetson nano. More on this here.

Show the current settings

sudo /usr/bin/jetson_clocks.sh --show
@hikiko4ern
hikiko4ern / .bash_aliases
Last active October 29, 2023 20:24
Pikachu test passed (demo: https://asciinema.org/a/236096)
# /------------------------------------------\
# | don't forget to download the .tp file |
# | and place it in the user's directory :› |
# | |
# | also install lolcat: |
# | https://github.com/busyloop/lolcat |
# \------------------------------------------/
alias test-passed='if [ "$?" -eq "0" ]; then lolcat ~/.tp -a -s 40 -d 2; fi;'
@stevejenkins
stevejenkins / Pi-hole on UC-CK 0.13.6
Last active March 4, 2024 17:30
Pi-hole on UC-CK 0.13.6
# Instructions for installing Pi-hole 4.2 on UniFi CloudKey Gen 1 (UC-CK) running firmware 0.13.6
# Pi-hole will need to be completely re-installed after every FW update or if CloudKey is reset to defaults.
# Verify UC-CK is running firmware v0.13.6 (or later) before installing Pi-hole. If not, do:
ubnt-systool fwupdate https://dl.ubnt.com/unifi/stage/cloudkey/firmware/UCK/UCK.mtk7623.v0.13.6.7ad551e.190225.0939.bin
# UC-CK firmware v0.13.6 downgrades UniFi Controller to 5.10.17. Upgrade to 5.10.19 with:
cd /tmp
wget https://dl.ubnt.com/unifi/5.10.19/unifi_sysvinit_all.deb
dpkg -i unifi_sysvinit_all.deb
@mak3r
mak3r / Rancher_2_air-gap_install.md
Last active March 8, 2022 00:16
Notes and comments on installing rancher 2 in an air-gap environment
@Oats87
Oats87 / generate_new_kubeconfig.sh
Created October 27, 2018 05:19
This bash script will sign an x509 certificate using the kube-ca located on any rancher node. This allows you to gain access back to your RKE-created kubernetes cluster should you lose the kube_config and cluster.yml for it, but still have SSH access to the hosts.
#!/bin/bash
echo "This will generate a new kube config for accessing your RKE-created kubernetes cluster. This script MUST be run on a Kubernetes node."
echo "Please enter the IP of one of your control plane hosts, followed by [ENTER]:"
read cphost
openssl genrsa -out kube-admin.key 2048
openssl req -new -sha256 -key kube-admin.key -subj "/O=system:masters/CN=kube-admin" -out kube-admin.csr
sudo openssl x509 -req -in kube-admin.csr -CA /etc/kubernetes/ssl/kube-ca.pem -CAcreateserial -CAkey /etc/kubernetes/ssl/kube-ca-key.pem -out kube-admin.crt -days 365 -sha256
sudo rm -f /etc/kubernetes/ssl/kube-ca.srl
@superseb
superseb / extended-cleanup-rancher2.sh
Last active March 13, 2024 09:22
Extended Rancher 2 cleanup (backup your data, use at your own risk)
#!/bin/sh
# Backup your data
# Use at your own risk
# Usage ./extended-cleanup-rancher2.sh
# Include clearing all iptables: ./extended-cleanup-rancher2.sh flush
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico"
@debsahu
debsahu / HA_RTLAMR.yaml
Last active February 14, 2024 00:58
RTLAMR: RTL-SDR to read electric/gas/water meters
shell_command:
rtlamr_start: 'python3.6 /home/pi/work/rtlamrmqtt.py'
kill_rtlamr: 'pkill -f rtlamr'
automation:
- action:
- data: {}
service: shell_command.rtlamr_start
alias: Start RTLAMR Script
condition: []
@JasonAtNvidia
JasonAtNvidia / txdocker
Last active March 8, 2022 08:15
Short Bash script to enable use of the GPU within a docker container running on an NVIDIA Jetson TX2. Place inside /usr/local/bin/, chmod +x txdocker, ensure it is in your system PATH, and use just as you would the docker command.
#!/bin/bash
#Jason T. 2-6-2018
# Check specifically for the run command
if [[ $# -ge 2 && $1 == "run" ]]; then
# Tell docker to share the following folders with the base system
# This allows the docker containers to find CUDA, cuDNN, TensorRT
LIB_MAPS="/usr/lib/aarch64-linux-gnu \
/usr/local/cuda \
/usr/local/cuda/lib64"