Skip to content

Instantly share code, notes, and snippets.

View ryankurte's full-sized avatar
🥔

ryan ryankurte

🥔
View GitHub Profile
@ryankurte
ryankurte / ParseStructs.go
Created April 27, 2017 04:04
Golang structure field parsing helper
/**
* Recursive struct parser for parsing string fields in go structure
* Copyright 2017 Ryan Kurte
* Released under the MIT License (https://choosealicense.com/licenses/mit/)
*/
package parser
import (
"log"
@ryankurte
ryankurte / makefile
Created March 2, 2017 00:44
Hugo static website generator helper makefile for github pages deployment
# A helper makefile for split master and gh-pages deployment with Hugo
# See https://gohugo.io/tutorials/github-pages-blog/#deployment-via-gh-pages-branch
# You must run:
# git checkout --orphan gh-pages
# git reset --hard
# git commit --allow-empty -m "Initializing gh-pages branch"
# git push upstream gh-pages
# git checkout master
# prior to using this makefile
@ryankurte
ryankurte / wpa_supplicant.conf
Created December 12, 2016 22:13
UoA WiFi config for linux
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
# Config for headless linux devices on UoA WiFi
network={
ssid="UoA-WiFi"
proto=RSN
key_mgmt=WPA-EAP
pairwise=CCMP
auth_alg=OPEN
@ryankurte
ryankurte / tips.c
Last active July 15, 2018 22:34
Embedded C Tips
// In embedded, use explicit integer sizes
#include <stdint.h>
// That way you know what you are using and where it will overflow
// Includes also come first in any C file
// Headers exist as prototypes to let the compiler know that it WILL be able to do something later on
// So that when you call this function
void function(uint8_t data1[], uint8_t length, uint8_t data2[]);
// It knows it should find this implementation somewhere else
@ryankurte
ryankurte / pinout.md
Last active September 4, 2016 04:26
Atmel XPlained PRO Zigbit + ATRF212B-0-U Hookup Guide

#Atmel XPlained PRO Zigbit + ATRF212B-0-U Hookup Guide

Main connector pinout

  1. GND
  2. nRST
@ryankurte
ryankurte / gencerts.sh
Last active January 13, 2025 15:51
Node.js Client Certificate Validation with Pinning Example
#!/bin/bash
# https://gist.github.com/ryankurte/bc0d8cff6e73a6bb1950
set -e
if [ "$#" -ne 3 ] && [ "$#" -ne 4 ]; then
echo "Usage: $0 CA NAME ORG"
echo "CA - name of fake CA"
echo "NAME - name of fake client"
echo "ORG - organisation for both"
@ryankurte
ryankurte / .dkrenv
Last active May 17, 2016 10:40
Docker local environment launcher
# Example .dkrenv file
IMAGE=ryankurte/docker-arm-embedded
@ryankurte
ryankurte / morse.md
Last active February 21, 2025 08:21
Morse Code Charts

Morse Code Tables

Helper tables for learning and interpreting morse code.

Ordered Codes

A ._
B _...
C _._.
D _..
E .
@ryankurte
ryankurte / Docker-Python
Last active January 26, 2016 22:41
Docker helper scripts and dockerfiles
# Docker container for python apps
FROM debian:stable
RUN apt-get update && apt-get install -y libc6 libc6-dev \
python-setuptools\
python-pip
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
@ryankurte
ryankurte / barcode.scad
Created January 18, 2016 05:51
3d printed barcode
barcode_width = 113;
barcode_height = 30;
barcode_depth = 2;
module_width = 1;
buffer = 4;
barcode = [
0, 0, 0, 0, 0, 0, 0, 0, 0, //quiet