Skip to content

Instantly share code, notes, and snippets.

View TheSkorm's full-sized avatar

Michaela Wheeler TheSkorm

View GitHub Profile
@TheSkorm
TheSkorm / gist:72b4a2eaba010fa63d8839215da4ecea
Created December 24, 2017 08:02
Magic Mikrotik Relay USB Battery Thing
/system routerboard usb
set usb-mode=force-host
/system scheduler
add name=schedule1 on-event=relay policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-time=startup
/system script
add name=relay owner=admin policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon source="#CONFIG\
\n# number of seconds until we turn off USB power\
\n:global Timeout 60\
\n\
\n\
"""
This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit.
The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well
as testing instructions are located at http://amzn.to/1LzFrj6
For additional samples, visit the Alexa Skills Kit Getting Started guide at
http://amzn.to/1LGWsLG
"""
import urllib, urllib2
import serial
import time
import string
failure = "Booting Linux on physical CPU" #this is the string we look for. If we find it we know we need to reset tthe device
ser = serial.Serial('/dev/tty.usbserial-A50285BI',baudrate=115200, bytesize=8, parity='N', stopbits=1, xonxoff=0, rtscts=0, timeout=0.1)
#dtr
def resetDevice(ser):
ser.dtr = False
time.sleep(1)
#include <ESP8266WiFi.h>
#include <WiFiUdp.h>
const char* ssid = "";
const char* password = "";
WiFiUDP Udp;
WiFiUDP Udp2;
WiFiUDP Udp3;
WiFiUDP Udp4;
var fs = require("fs");
var sad = function(){
return true;
};
sad.stop = function(){
return true
}
beAwesome = function(){

Keybase proof

I hereby claim:

  • I am theskorm on github.
  • I am mwheeler (https://keybase.io/mwheeler) on keybase.
  • I have a public key whose fingerprint is 3FDF A1C8 4454 D90B 2EA1 0640 3F57 BDEF ACED C0DE

To claim this, I am signing this object:

homeassistant:
# Name of the location where Home Assistant is running
name: Home
# Location required to calculate the time the sun rises and sets
# Impacts weather/sunrise data
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: Australia/Melbourne
; G-Code generated by Simplify3D(R) Version 3.0.2
; Aug 7, 2016 at 11:31:45 AM
; Settings Summary
; processName,Process1
; applyToModels,fox
; profileName,3KU (modified)
; profileVersion,2016-06-28 22:06:37
; baseProfile,Default
; printMaterial,ABS
; printQuality,Medium
# Robot module configurations : general handling of movement G-codes and slicing into moves
arm_solution linear_delta # delta selection
arm_length 226 # this is the length of an arm from hinge to hinge
arm_radius 108.11 # this is the horiontal distance from hinge to hinge when the effector is centered
default_feed_rate 3000 # Default rate ( mm/minute ) for G1/G2/G3 moves
default_seek_rate 3000 # Default rate ( mm/minute ) for G0 moves
mm_per_arc_segment 0.0 # Fixed length for line segments that divide arcs 0 to disable
mm_max_arc_error 0.01 # The maximum error for line segments that divide arcs 0 to disable
@TheSkorm
TheSkorm / plant.ino
Created May 10, 2016 10:27
Plant monitoring slack thing
/*
* HTTP over TLS (HTTPS) example sketch
*
* This example demonstrates how to use
* WiFiClientSecure class to access HTTPS API.
* We fetch and display the status of
* esp8266/Arduino project continuous integration
* build.
*
* Created by Ivan Grokhotkov, 2015.