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
petonic / hassio_install.sh
Created May 17, 2018 14:48
Shellscript to set up Hassio on a Odroid XU4 Ubuntu server
#!/bin/bash
#
# Run this as root with the following parameters for the Odroid XU4 and
# the docker library directory at /z/dockerLib:
#
# sudo ./hassio_install.sh -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
petonic / OZWCP-Install-instructionsl.md
Last active June 9, 2021 12:27 — forked from chriskacerguis/install.md
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
petonic / README.md
Last active May 5, 2018 17:21 — forked from atenni/README.md
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.

Solution:

To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/

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

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

HASSIO Addon SSH Config Files.md

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

.zshrc

Standard ZSH Run Control file with Petonic customizations.

rmate

stub
@petonic
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
master_hostname="kaypro"
local_editor_cmd="atom"
#
# 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
petonic / .zshrc
Last active May 5, 2018 15:42
hassio-addon-ssh-zshrc
#
# .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
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 git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

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

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
@petonic
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