Skip to content

Instantly share code, notes, and snippets.

View petonic's full-sized avatar

Mike Petonic petonic

  • NY, NY USA
View GitHub Profile
petonic /
Created May 17, 2018 14:48
Shellscript to set up Hassio on a Odroid XU4 Ubuntu server
# Run this as root with the following parameters for the Odroid XU4 and
# the docker library directory at /z/dockerLib:
# sudo ./ -d /z/hass -m qemuarm
# After it's done, it takes several minutes for Hassio-Supervisor and then
# Homeassistant docker containers to run and populate their configurations.
# You may see spurious errors in the various containers until around 5mins or
petonic /
Last active June 9, 2021 12:27 — forked from chriskacerguis/
Install OZWCP on Ubuntu

First, install some (probably) important libraries:

apt-get update
apt-get install libgnutls28-dev libgnutlsxx28

Download, build and install libmicrohttpd

petonic /
Last active May 5, 2018 17:21 — forked from atenni/
How to permalink to a gist's raw file

Problem: When linking to the raw version of a gist, the link changes with each revision.


To return the first file from a gist:[gist_user]/[gist_id]/raw/

To get a file from multi–file gist:[gist_user]/[gist_id]/raw/[file_name]

petonic / @01 HASSIO Addon SSH Config
Last active May 18, 2018 12:40
Hassio Associated files for the Hassio Community SSH Add-on

HASSIO Addon SSH Config

This gist contains the customizations for the Hassio SSH Community Add on.


Standard ZSH Run Control file with Petonic customizations.


petonic / rmate
Created May 5, 2018 15:44
Hassio Addon SSH Files
#!/usr/bin/env bash
# Name of my laptop to check if we're local editing
# Petonic version {2016-11-20 SUN 12:54}
# Modified for ///READONLY/// auto -f {2016-11-26 SAT 10:01}
# Modified for USE_NFS mountpoint [2017-04-16 SUN 12:57]
petonic / .zshrc
Last active May 5, 2018 15:42
# .zshrc for hassio SSH
# Changelog:
# 2018-05-05 Initial
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
export EDITOR=/usr/local/bin/rmate
petonic / gist:5e3d4d923137728885f13af86d656011
Created April 15, 2018 18:49 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream
petonic / avg_mpmini_autopid
Last active March 28, 2018 03:17
Automatically does the math to set the PID params for the MonoPrice Mini Extruder (v2) to the correct calculated values
#!/usr/bin/env python3
This script reads in the serial log file after running an auto-tune on
for the extruder PID. It then takes averages of each cycle and prints out
the average value for each of 'p', 'i', and 'd' for all three of
{Classic, Overshoot, Both} sets of values. These are printed out in a
g-code format that is ready to cut and paste into OctoPrint's terminal
window. Remember to do an "M500" to save the settings after you do so.
This is a necessary step because unlikely enough, the Monoprice Mini firmware