Skip to content

Instantly share code, notes, and snippets.

@hovissimo
hovissimo / node-red
Last active August 29, 2015 14:04 — forked from bigmonkeyboy/README.md
#! /bin/sh
# Starts and stops Node-RED
# /etc/init.d/node-red
### BEGIN INIT INFO
# Provides: node-red
# Required-Start: $syslog
# Required-Stop: $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Node-RED initialisation
@hovissimo
hovissimo / Magic Gate
Created August 11, 2014 01:55
Magic Gate function for Node-RED, it let's you repeat messages arbitrarily
/* This function node will store the last message it
received as long as msg.payload != "abracadabra".
If this function receives a msg where the payload
exactly equals "abracadabra" then the stored
message will be forwarded.
This function is designed for storing and replaying
messages to help in testing flows. You can use it
by wiring up between two nodes where you want to
control or repeat messages, and also adding an

Keybase proof

I hereby claim:

  • I am hovissimo on github.
  • I am hovis (https://keybase.io/hovis) on keybase.
  • I have a public key whose fingerprint is 5BF2 5C94 C3DE 8B11 09CA 5784 16B8 1A24 21E3 B5F1

To claim this, I am signing this object:

import re
import csv
re_degenerates = re.compile(r"[wsmkrybdhvn]")
def get_patterns(filename):
with open(filename) as f:
lines = f.readlines()[2:] # the first two lines aren't data
for record in csv.reader(lines):
index = record[0] # the first column is the pattern id
import re
import csv
re_degenerates = re.compile(r"[wsmkrybdhvn]")
def get_patterns(filename):
with open(filename) as f:
#lines = f.readlines()[2:] # the first two lines aren't data
lines = f.readlines()
for record in csv.reader(lines):
<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="smoothie.js"></script>
<script src="https://cdn.firebase.com/js/client/2.2.0/firebase.js"></script>
</head>
<body>
<h1>Garage temperatures in &deg;C</h1>
@hovissimo
hovissimo / metric radius gauges.jscad
Last active August 29, 2015 14:15
openjscad file for making gauge tools to measure curve radius in mm
/***************************
* Author: Hovis
* File: metric radius gauges.jscad
* Description: This file can be used with openjscad.org to generate 3d models for some tools I designed. The tools are gauges to measure the radii of inside and outside corners by guess-and-check. These 3d models are intended to be easy to print on any 3d printer.
* License: GPL v2
***************************/
function main() {
// These are the mm radii
var sizes = [2, 3, 4, 5, 6, 7];
@hovissimo
hovissimo / config.ini
Created March 2, 2015 05:31
printrbot 1403 hovis config.ini
# generated by Slic3r 1.1.7 on Sun Mar 1 21:30:10 2015
avoid_crossing_perimeters = 0
bed_size = 150,150
bed_temperature = 65
bottom_solid_layers = 2
bridge_acceleration = 5000
bridge_fan_speed = 100
bridge_flow_ratio = 1
bridge_speed = 40
brim_width = 0
@hovissimo
hovissimo / slide fit calibration
Created February 3, 2016 01:30
Gcode for a test part (3d printing)
; generated by Slic3r 1.2.9 on 2016-02-02 at 17:23:42
; external perimeters extrusion width = 0.50mm
; perimeters extrusion width = 0.50mm
; infill extrusion width = 0.50mm
; solid infill extrusion width = 0.50mm
; top infill extrusion width = 0.50mm
M107
M190 S60 ; set bed temperature
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.