Skip to content

Instantly share code, notes, and snippets.

View predominant's full-sized avatar
🦄

Graham Weldon predominant

🦄
View GitHub Profile
@predominant
predominant / rocketpi.sh
Created August 3, 2022 10:42
RocketPi Setup
View rocketpi.sh
sudo apt-get update
sudo apt-get dist-upgrade -y
sudo apt-get install -y python3 python3-pip python3-venv
sudo pip3 install --upgrade setuptools
sudo pip3 install --upgrade adafruit-python-shell
wget https://raw.githubusercontent.com/adafruit/Raspberry-Pi-Installer-Scripts/master/raspi-blinka.py
sudo python3 raspi-blinka.py
sudo pip3 install adafruit-circuitpython-pca9685
# Agree to reboot
@predominant
predominant / Car.js
Created July 20, 2020 09:12
Legacy Unity Car Controller Code (Javascript)
View Car.js
private var wheelRadius : float = 0.4;
var dragMultiplier : Vector3 = new Vector3(2, 5, 1);
var throttle : float = 0;
private var steer : float = 0;
private var handbrake : boolean = false;
var centerOfMass : Transform;
@predominant
predominant / inspec-scaffolding-v2.md
Created July 16, 2020 01:09
Notes regarding a "next generation" implementation of Chef Inspec scaffodling for Chef Habitat.
View inspec-scaffolding-v2.md

Scaffolding vNext

Motivation

The current scaffolding works really well.

Improvements and rearchitecting the current scaffolding would allow for greater flexibility, visibility and customization in profile use and reporting.

Goals

View composer-build-fail.txt
★ Install of core/git/2.23.0/20190908235432 complete with 3 new packages installed.
composer: Resolved dependency 'core/git' to /hab/pkgs/core/git/2.23.0/20190908235432
composer: WARN:
composer: WARN: The following runtime dependencies have more than one version
composer: WARN: release in the full dependency chain:
composer: WARN:
composer: WARN: * core/curl ( core/curl/7.67.0/20191202111040 core/curl/7.65.3/20190826035620 )
composer: WARN:
composer: WARN: The current situation usually arises when a Plan has a direct
composer: WARN: dependency on one version of a package (`acme/A/7.0/20160101200001`)
@predominant
predominant / __summary_conf
Created November 12, 2019 04:49
Ubuntu default Nginx Configuration
View __summary_conf
# This represents the core of the configuration with comments removed. Showing the default server, and core nginx.conf settings.
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
}
View arm-habitat.diff
diff --git a/components/core/Cargo.toml b/components/core/Cargo.toml
index bb7444f15..4dea66b4b 100644
--- a/components/core/Cargo.toml
+++ b/components/core/Cargo.toml
@@ -52,7 +52,7 @@ windows-acl = "*"
num_cpus = "*" # For doc tests
[features]
-default = ["supported_targets"]
+default = ["supported_targets", "armhf-linux"]
@predominant
predominant / groundskeeper-output.txt
Last active December 22, 2020 00:01
Groundskeeper output (Text Format)
View groundskeeper-output.txt
[ Habitat ] ------------------------------------------
[ Core Plans ] ------------------------------------------
| 7zip 16.02 16.02
> R 3.5.0 4.0.3
| acbuild 0.4.0 0.4.0
> alex 3.2.5 3.2.6
> alsa-lib 1.1.9 1.2.4.sig
> ansible 2.9.7 2.8.18
@predominant
predominant / 1.txt
Last active August 27, 2019 02:39
Output sampling for releases of Groundskeeper
View 1.txt
| 7zip 16.02 16.02
> R 3.5.0 3.6.1
| acbuild 0.4.0 0.4.0
| acl 2.2.53 2.2.53 (base-plan)
| alex 3.2.4 3.2.4
| alsa-lib 1.1.9 1.1.9
> ansible 2.8.2 2.6.19
| ant 1.10.6 1.10.6
| apr-util 1.6.1 1.6.1
| apr 1.7.0 1.7.0
@predominant
predominant / start-live-coding.sh
Last active September 26, 2019 05:56
[Live Coding Shell] A Bash-entering script that sets up a nice, clean PS1 for live coding/presentations. #shell #livecode #bash
View start-live-coding.sh
#!/bin/sh
PROMPT_COMMAND=__prompt_command
export PROMPT_COMMAND
__prompt_command() {
local EXIT="$?"
local RCol='\[\e[0m\]'
local Red='\[\e[0;31m\]'
@predominant
predominant / Vagrantfile
Created July 5, 2018 07:15
Habitat 3-node supervisor ring in Vagrant/Virtualbox
View Vagrantfile
$script = <<SCRIPT
groupadd hab
useradd hab -g hab
curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | bash
hab pkg install core/cacerts
hab pkg install core/hab-sup
cat <<EOT > /hab/cache/keys/vagrantring-20180621073652.sym.key
SYM-SEC-1
vagrantring-20180621073652