Skip to content

Instantly share code, notes, and snippets.

; Setup and Teardown GCode for Printrbot Simple Metal
; Start GCode
G90
G28 X0 Y0 ; Home X and Y
G92 E0 ; Zero the extruder
G29 ; Auto-level the bed.
G0 X0 Y0 Z0.25 F8000 ; Move to the front-left part of the bed.
G92 E0 ; Zero the extruder.
G1 X30 E15 F500 ; Extrude a fat line of filament to prime and clean the nozzle.
@dacunni
dacunni / gist:211a265b76bb6085be31
Created February 26, 2016 17:46
X Windows Tricks
# Remotely power on monitor
xset dpms force on
# Remotely deactivate screensaver
gnome-screensaver-command -d
@dacunni
dacunni / printrbot_gcode.txt
Last active September 25, 2018 01:32
Printrbot GCODE Reference
Printrbot G-Code
- speeds are in mm/min
- temperature is in degrees Celsius
M501 - print settings
M500 - save settings
M212 - view/change offsets
M114 - show current nossle position
@dacunni
dacunni / Bypassing ptrace
Created May 30, 2014 19:43
Bypassing ptrace
Ptrace can deny access to a debugger by causing the app to crash if run from the debugger. Here is a workaround from lldb. 42 was the magic number for me on MacOS, but you might see what it should be for you by setting the breakpoint, doing a 'dis', and computing the difference between the return instruction and the current value of $pc.
br set -n ptrace
br command add 1
register write pc `$pc + 42`
cont
DONE
@dacunni
dacunni / getivoshows.bash
Created November 19, 2012 01:04
Download Tivo index and .tivo files
#!/bin/bash
TIVOIP=
TIVOPORT=443
TIVOMAK=
# Fetch the index.html file
curl --anyauth --user tivo:$TIVOMAK --insecure --cookie-jar cookies --url "https://$TIVOIP:$TIVOPORT/nowplaying/index.html" -o index.html
# Fetch the linked recordings
#wget --save-cookies cookies.txt --no-check-certificate --input-file=index.html --force-html --http-user=tivo --http-password=$TIVOMAK