Skip to content

Instantly share code, notes, and snippets.

View imrahil's full-sized avatar

Jarek Szczepanski imrahil

  • Imrahil Corporation
  • Switzerland
View GitHub Profile
@imrahil
imrahil / ecdb_missing_components.js
Created March 15, 2012 09:39
ecDB.net - Adds red background to missing components
// ==UserScript==
// @name ecDB
// @namespace http://www.ecdb.net
// @description Adds red background to missing components
// @include http://ecdb.net/proj_show.php?proj_id=*
// ==/UserScript==
var componentsTable = document.getElementsByClassName('globalTables')[0];
var componentsTableBody = componentsTable.getElementsByTagName("tbody")[0];
var componentsTableRows = componentsTableBody.getElementsByTagName("tr");
@imrahil
imrahil / gist:b7448c034a933f4ef852
Last active March 29, 2016 19:56
OctoPrint error
2014-10-07 17:23:38,493 - octoprint.server - INFO - Starting OctoPrint (1.2.0-dev-150-g192a0aa)
2014-10-07 17:23:38,672 - octoprint.gcodefiles - INFO - Migrating metadata if necessary...
2014-10-07 17:23:38,685 - octoprint.gcodefiles - INFO - Updated 0 sets of metadata to new format
2014-10-07 17:23:38,722 - octoprint.server - INFO - Listening on http://0.0.0.0:5000
2014-10-07 17:24:16,410 - octoprint.server.util.sockjs - INFO - New connection from client: 192.168.0.12
2014-10-07 17:47:56,177 - octoprint.server - CRITICAL - Now that is embarrassing... Something really really went wrong here. Please report this including the stacktrace below in OctoPrint's bugtracker. Thanks!
2014-10-07 17:47:56,202 - octoprint.server - ERROR - Stacktrace follows:
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/OctoPrint-1.2.0_dev_150_g192a0aa-py2.7.egg/octoprint/server/__init__.py", line 247, in run
IOLoop.instance().start()
@imrahil
imrahil / calibration.gco
Last active July 16, 2018 01:20
Parameterized GCODE Script for OctoPrint - quick and dirty bed / Z axis calibration
{% set x_count = parameters.x_count %}
{% set y_count = parameters.y_count %}
{% set x_step = printer_profile.volume.width / (x_count - 1) %}
{% set y_step = printer_profile.volume.depth / (y_count - 1) %}
{% set zhop = parameters.z_hop %}
{% set speed = parameters.travel_speed %}
{% set speed_z = parameters.z_speed %}
{% set pos_X = 0 %}
{% set pos_Y = 0 %}
M117 run {{ script.name }}
@imrahil
imrahil / gist:3e933d0014f3e87ea252
Created April 29, 2015 15:06
Virtualenv error
pi@raspberrypi ~/OctoPrint $ ./venv/bin/python setup.py install
/home/pi/OctoPrint/venv/local/lib/python2.7/site-packages/setuptools/dist.py:291: UserWarning: The version specified ('1.2.0-dev-800-g9f0128c') is an invalid version, this may not work as expected with newer versions of setuptools, pip, and PyPI. Please see PEP 440 for more details.
"details." % self.metadata.version
running install
running bdist_egg
running egg_info
writing requirements to OctoPrint.egg-info/requires.txt
error: OctoPrint.egg-info/requires.txt: Permission denied
@imrahil
imrahil / gist:2e8d59604ca5490e99f5
Created June 18, 2015 18:25
error while saving settings
2015-06-18 20:24:16,319 - octoprint - ERROR - Exception on /api/settings [POST]
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1687, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1360, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1358, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/Flask-0.9-py2.7.egg/flask/app.py", line 1344, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
@imrahil
imrahil / pip.log
Created September 20, 2015 18:56
pip error
/home/octo/Octoprint/venv/bin/pip run on Sun Sep 20 20:54:13 2015
Downloading/unpacking https://github.com/imrahil/OctoPrint-PrintHistory/archive/master.zip
Downloading from URL https://github.com/imrahil/OctoPrint-PrintHistory/archive/master.zip
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
#!/usr/bin/env python2
import math, random, copy, sys
inputfile = ""
outputfile = ""
for i in range(len(sys.argv)):
if i == 0:
continue
@octoprint.plugin.BlueprintPlugin.route("/history", methods=["GET"])
def getHistoryData(self):
self._console_logger.debug("Rendering history.yaml")
def view():
history_dict = self._getHistoryDict()
if history_dict is not None:
self._console_logger.debug("Returning data")
result = jsonify(history=history_dict)