Skip to content

Instantly share code, notes, and snippets.

🦃
fast and loose is still fast.

Brandon bgulla

🦃
fast and loose is still fast.
  • Virginia
Block or report user

Report or block bgulla

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bgulla
bgulla / meterears-preview.py
Created Aug 14, 2019
Reading electric meters using a usb-sdr
View meterears-preview.py
#!/usr/bin/python
import sys
import os
import platform
import time
import subprocess
import json
import socket
import logging
from influxdb import InfluxDBClient
@bgulla
bgulla / oc-cli-arm64.md
Last active Aug 9, 2019
Installing oc-cli on Jetson Nano
View oc-cli-arm64.md

Building oc-cli for ARM Architectures

ARM64/AARCH64 (Jetson Nano) or RPi 4

cd $GOPATH
git clone -b release-3.11 https://github.com/openshift/origin.git
sudo apt install libgpgme-dev -y 
mkdir -p src/github.com/openshift
mv origin src/github.com/openshift/
go build -v github.com/openshift/origin/cmd/oc
@bgulla
bgulla / rancher_uninstall.sh
Created Jul 29, 2019
Removes rancher from a host
View rancher_uninstall.sh
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
sleep 1
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
rm -rf /etc/ceph \
/etc/cni \
@bgulla
bgulla / imessage_dump.py
Created Jun 25, 2019
Dumps all images from iMessages.
View imessage_dump.py
import os
import shutil
mkdir ~/Desktop/imessage
rootDir = "/Users/${USER}/Library/Messages/Attachments"
destDir = "/Users/${USER}/Desktop/imessage"
IGNORE_STRING = "pluginPayloadAttachment"
for dirName, subdirList, fileList in os.walk(rootDir):
#print("Found directory: %s" % dirName)
@bgulla
bgulla / jetson_nano_cheatsheet.md
Last active Sep 24, 2019
Notes related to the NVIDIA Jetson Nano dev kit
View jetson_nano_cheatsheet.md

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
@bgulla
bgulla / boozer_help.md
Last active Apr 7, 2019
Troubleshoot boozer deployments with this handy-dandy script.
View boozer_help.md

Boozer Boilerplate Test

The following instructions are certified-correct way to get yourself a working boozer setup.

Step 1: Setup Environment & dl database file

Run the following commands.

mkdir ~/boozer-test
cd ~/boozer-test
wget https://github.com/bgulla/boozer/raw/master/db/db.sqlite #Downloads the baseline database file.
touch config.ini
View kubernetes_cert_prep.md

API Primitives

Object Spec:

  • Provided to k8s
  • Describes desired state of objects

Object status:

  • provided by k8s
  • describes the actual state of the object

More on APIs:

View gist:cadd73516dca486888eda21c7ee7ce6c
user@gulla-brandon-9ad8ebdf2:~$ sudo su -
1a5g@twog3tJ48^
^C[sudo] password for user:
You are required to change your password immediately (root enforced)
su: Authentication token is no longer valid; new one required
(Ignored)
root@gulla-brandon-9ad8ebdf2:~# sudo docker pull k8s.gcr.io/kube-scheduler-amd64:v1.10.1
v1.10.1: Pulling from kube-scheduler-amd64
f70adabe43c0: Pull complete
9dc7b6510188: Pull complete
View linux_academy_fail.txt
user@gulla-brandon-9ad8ebdf3:~$ sudo kubeadm init --pod-network-cidr=10.244.0.0/16
[init] Using Kubernetes version: v1.10.1
[init] Using Authorization modes: [Node RBAC]
[preflight] Running pre-flight checks.
[WARNING FileExisting-crictl]: crictl not found in system path
Suggestion: go get github.com/kubernetes-incubator/cri-tools/cmd/crictl
[certificates] Generated ca certificate and key.
[certificates] Generated apiserver certificate and key.
[certificates] apiserver serving cert is signed for DNS names [gulla-brandon-9ad8ebdf3.mylabserver.com kubernetes kubernetes.default kubernetes.default.svc kubernetes.default.svc.cluster.local] and IP
s [10.96.0.1 172.31.115.181]
View bmp180.cpp
#include <ESP8266WiFi.h>
#include <Wire.h>
#include <PubSubClient.h>
#include <Adafruit_BMP085.h>
//#include <Adafruit_HDC1000.h>
#define wifi_ssid "ssid"
#define wifi_password "redacted"
#define mqtt_server "10.0.1.11"
You can’t perform that action at this time.