Skip to content

Instantly share code, notes, and snippets.

# coding=utf-8
import octoprint.plugin
class RewritePlugin(octoprint.plugin.OctoPrintPlugin):
def __init__(self):
self.ip_address = "192.168.0.2"
def rewrite(self, comm_instance, phase, cmd, cmd_type, gcode, *args, **kwargs):
if gcode and gcode not in ["M106", "M107"]:
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
import octoprint.plugin
import flask
import time
class ConnectAndPrintPlugin(octoprint.plugin.EventHandlerPlugin,
octoprint.plugin.RestartNeedingPlugin):
{
"config": {
"octoprint": {
"url": "http://localhost:5000/",
"accessToken": ""
},
"printer": {
"name": "Printer",
"xySpeed": 150,
"zSpeed": 5,
# -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import re
import octoprint.plugin
TIME_REMAINING_THRESHOLD = 2 # mins
COOLDOWN_COMMAND = "M140 S0"
M73_R_REGEX = re.compile(r"R(\d*)")

Keybase proof

I hereby claim:

  • I am jneilliii on github.
  • I am jneilliii (https://keybase.io/jneilliii) on keybase.
  • I have a public key ASCkXbsSgZek_aPaDqWfmYToGWR1-TN7_3u0ZoaT6n72JAo

To claim this, I am signing this object:

@jneilliii
jneilliii / lightshow.agent.nut
Last active January 3, 2016 06:54 — forked from ElectricImpSampleCode/lightshow.agent.nut
Micro Light Show project code
// Agent Code
function getForm(msg){
local effects = ["glow","random","looper","larson","awaiting command"];
// HTML output
local returnValue = @"<!DOCTYPE html>
<html>
<head>
<title>RGB Tail Light Show</title>