Skip to content

Instantly share code, notes, and snippets.

@moonthug
moonthug / start.gcode
Last active July 18, 2023 04:25
Ender 6 Start GCode
M117 Setup Machine...;
M201 X500.00 Y500.00 Z100.00 E5000.00 ; Setup machine max acceleration
M203 X500.00 Y500.00 Z10.00 E50.00 ; Setup machine max feed-rate
M204 P500.00 R1000.00 T500.00 ; Setup Print/Retract/Travel acceleration
M205 X8.00 Y8.00 Z0.40 E5.00 ; Setup Jerk
M412 S1 ; Enable fillament sensor
M413 S0 ; Disable print powerloss recovery
M220 S100 ; Reset Feedrate
@moonthug
moonthug / README.md
Last active October 17, 2018 15:12
Using AWS X-Ray with Hapi.js

HapiJS with AWS XRay

A quick brain dump of where I'm at with getting Hapi and AWS Xray working

I'll might turn into a Hapi plugin at some point...

@moonthug
moonthug / decompose.js
Last active September 20, 2017 14:10
Takes a D3/CSS transform string value and decomposes to an object
/**
* Decomposes transform attribute in an object
* @param {string} input Transform string to decompose
* @param {boolean=true} asString Return the values as arrays (false) or transform strings (true)
* @returns {}
*/
const getTransform = (input, asString = true) => {
const typeRegex = /(\w+\([\w+., -]*\))/g;
const valuesRegex = /([-\d.]+)[, ]?/g;
### Keybase proof
I hereby claim:
* I am moonthug on github.
* I am moonthug (https://keybase.io/moonthug) on keybase.
* I have a public key whose fingerprint is 7699 8F28 5090 520A 04F8 9D02 F8B6 15FD 25A3 F9DD
To claim this, I am signing this object:
@moonthug
moonthug / designer.html
Created September 18, 2014 08:55
designer
<link rel="import" href="../google-map/google-map-directions.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@moonthug
moonthug / designer.html
Last active August 29, 2015 14:06
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="my-element">
@moonthug
moonthug / basic_camera.cpp
Created March 16, 2014 13:59
Basic camera setup in OpenFrameworks
camera.setPosition(
ofGetWidth() / 2,
ofGetHeight() / 2,
camera.getImagePlaneDistance(ofGetCurrentViewport())
);
@moonthug
moonthug / wp_to_pyro.php
Created January 22, 2013 15:40
Extract users and post from a Wordpress data export XML file and insert them into PyroCMS
<?php
////////////////////////////////////////////////////////////////////////////////
//
// Wordpress -> PyroCMS
//
//
// Config
$filename = "<WP EXPORT FILE>";