Skip to content

Instantly share code, notes, and snippets.

View ytjohn's full-sized avatar

John Hogenmiller ytjohn

View GitHub Profile
@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)
# pillar
autosalt:
frequency: 15 # in minutes
minions:
'*':
sls:
- examples.pop
'minion*':
expr_form: glob
highstate: True
@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);
@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 / 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 / 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 / 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 / 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 / crash.log
Created March 11, 2016 14:28
nouveau
(EE) Backtrace:
(EE) 0: /usr/bin/X (xorg_backtrace+0x4e) [0x55ace80e168e]
(EE) 1: /usr/bin/X (mieqEnqueue+0x253) [0x55ace80c3373]
(EE) 2: /usr/bin/X (QueuePointerEvents+0x52) [0x55ace7f9d152]
(EE) 3: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x60a7) [0x7f8f174800a7]
(EE) 4: /usr/lib/xorg/modules/input/evdev_drv.so (0x7f8f1747a000+0x687d) [0x7f8f1748087d]
(EE) 5: /usr/bin/X (0x55ace7f2d000+0x96ac8) [0x55ace7fc3ac8]
(EE) 6: /usr/bin/X (0x55ace7f2d000+0xbfc92) [0x55ace7fecc92]
(EE) 7: /lib/x86_64-linux-gnu/libc.so.6 (0x7f8f20a53000+0x352f0) [0x7f8f20a882f0]
(EE) 8: /lib/x86_64-linux-gnu/libc.so.6 (ioctl+0x7) [0x7f8f20b50067]
@ytjohn
ytjohn / Makefile
Created March 14, 2016 17:54
on-http makefile
.PHONY: clean deps test deb
SHELL := /bin/bash
CWD ?= $(shell pwd)
BRANCH ?= $(git symbolic-ref --short -q HEAD)
help:
@echo "deps - install build dependencies"
@echo "test - run tests"
@echo "apidoc - build docs"