Skip to content

Instantly share code, notes, and snippets.

View ytjohn's full-sized avatar

John Hogenmiller ytjohn

View GitHub Profile
@ytjohn
ytjohn / static.md
Created March 8, 2016 21:50
static workflow
+----------------------------+                +-----------------------------+
|         managed node       |                |         rackhd              |
+----------------------------+                +-----------------------------+
| unknown node powered on    +---+ pxe req +--> dhcpd assisng random addr   |
| boots monorail             <-| monorail +---| bootstrap initiated         |
| sends catalogs             +-+ catalog +----> sku matches exact node      |
|                            |                | workflow begins             |
@ytjohn
ytjohn / install-trusty.ipxe
Created February 17, 2016 13:45
ubuntu install with rackhd
echo Starting Ubuntu x64 installer for ${hostidentifier}
set base-url http://<%=server%>:<%=port%>/ubuntu/dists/trusty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
kernel ${base-url}/linux
initrd ${base-url}/initrd.gz
imgargs linux auto=true DEBIAN_FRONTEND=noninteractive url=http://<%=server%>:<%=port%>/api/common/templates/ubuntu-trusty-preseed hostname=<%=hostname%> log_host=<%=server%> BOOTIF=01-<%=macaddress%> interface=auto console=tty0 console=<%=comport%>,115200n8
boot || prompt --key 0x197e --timeout 2000 Press F12 to investigate || exit shell
@ytjohn
ytjohn / GPG-Salt-Prod.md
Created January 29, 2016 15:01
GPG-Salt-Prod.md

GPG In Pillar

Include this file in the git repo with your pillar data. It provides instructions for those commiting code to securely save and commit senstive data (like password and private certs).

This the Salt Prod key:

key A1234567: "Salt Prod [email protected]"

@ytjohn
ytjohn / ceph.conf
Last active January 25, 2016 21:03
rain lab
[global]
osd pool default size = 2
fsid = 4ebe7995-6a33-42be-bd4d-20f51d02ae45
mon_initial_members = rain02-r01-01
mon_host = 172.29.4.148
auth_cluster_required = cephx
auth_service_required = cephx
auth_client_required = cephx
filestore_xattr_use_omap = true
@ytjohn
ytjohn / pelletmeter.ino
Created December 22, 2015 15:52
Use IR photodiodes to measure levels 1-5.
int power = A5; // This is the power side of our photodiodes. The other side is plugged into the "photoresistor" pin (above).
int lowout = A4;
int led = D0; // This is where your LED is plugged in. The other side goes to a resistor connected to GND.
int boardLed = D7; // This is the LED that is already on your device.
int read1 = D1;
int read2 = D2;
int read3 = D3;
int read4 = D4;
int read5 = D5;
@ytjohn
ytjohn / dreader.ino
Last active December 21, 2015 18:58
read pins
int waittime = 2100;
void setup() {
pinMode(A5,OUTPUT);
pinMode(A4, OUTPUT);
digitalWrite(A5,HIGH);
digitalWrite(A4, LOW);
# pillar
autosalt:
frequency: 15 # in minutes
minions:
'*':
sls:
- examples.pop
'minion*':
expr_form: glob
highstate: True
@ytjohn
ytjohn / socketread.py
Created August 10, 2015 03:09
socket read
import kiss
import aprs
k = kiss.KISS(host='10.10.0.106', port=8001)
k.logger.LOG_LEVEL = "INFO"
k.start() # inits the TNC, optionally passes KISS config flags.
def printtheframe(frame):
frame_len = len(frame)
@ytjohn
ytjohn / amh350.ipynb
Last active February 2, 2020 20:49
Uniden/Force AMH 350 Frequency programming
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ytjohn
ytjohn / direwolf.log
Created April 4, 2015 02:02
playing with sockets in kiss.py
Connected to KISS client application ...
[0L] KB3DFZ-5>APDW10,WIDE1-1,WIDE2-1:testing
[0L] KB3DFZ-5>APDW10,WIDE1-1:;444.200+R*111111z4000.80N/07833.25Wr444.200MHz T123 +500 k3nqt www.bcars.org
Digipeater WIDE1 (probably W3YA-1) audio level = 8 [SINGLE]
[0] KB3DFZ-5>APDW10,W3YA-1,WIDE1*:;444.200+R*111111z4000.80N/07833.25Wr444.200MHz T123 +500 k3nqt www.bcars.org
Object, "444.200+R", Repeater, DireWolf, WB2OSZ
N 40 00.8000, W 078 33.2500, 444.200MHz T123 +500
k3nqt www.bcars.org