Skip to content

Instantly share code, notes, and snippets.

View gotno's full-sized avatar

Will Floyd gotno

View GitHub Profile
@gotno
gotno / gist:cee7828c3883b5267de0
Created October 30, 2014 21:21
release_10-30_todo
remove-zendesk: test mail related stuff
remove-skylight: probably nothing to test here?
squished-comment-signin: is comment signin still squished?
event-sweeper-fix: create event, add/remove sponsor, cache should be swept immediately
implement-fastclick: test demo on mobile
shift-static-route: test demo.thebolditalic.com/shift
sharethrough-article-ad: ensure ad collapses on desktop
@gotno
gotno / config.ru
Created April 7, 2020 17:54
basic roda
require "roda"
class Rodaaaaaapp < Roda
route do |r| # `r` is just Rack::Request + a few additional methods for routing (see below)
r.root do
"hey."
end
end
end
@gotno
gotno / anycubic_mega_x_start_with_nozzle_wipe.gcode
Created January 9, 2021 22:08
Anycubic Mega X start gcode with nozzle purge/wipe
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Z15.0 F{speed_travel} ;move the platform down 15mm
G92 E0 ;zero the extruded length
; remove the following line
@gotno
gotno / mega_x_start.gcode
Created June 28, 2021 15:38
Mega X start gcode with purge
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28 X0 Y0 ;move X/Y to min endstops
G28 Z0 ;move Z to min endstops
G1 Y5.0 F{speed_travel} ;move the platform down 15mm
G92 E0 ;zero the extruded length
G1 X40 E30 F200 ; Extrude 30mm of filament in a 4cm line
NVGcolor getModuleBodyColor(NSVGimage* svgHandle) {
// educated guess as to what a reasonable minimum area should be,
// based on testing a bunch of different modules
float largestArea{11000.f};
// default in case we can't find anything reasonable
NVGcolor bodyColor = nvgRGBA(255, 255, 255, 255);
for (NSVGshape* shape = svgHandle->shapes; shape; shape = shape->next) {
// skip invisible shapes