Skip to content

Instantly share code, notes, and snippets.

View jonnolen's full-sized avatar

Jon Nolen jonnolen

  • Indianapolis, IN
View GitHub Profile
@jonnolen
jonnolen / end.gcode
Last active December 17, 2022 21:47
Cura Ender 3v2 Settings
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positioning
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
@jonnolen
jonnolen / le-commands.md
Last active January 24, 2022 01:28
ffmpeg commands

Create a timelapse

  • -r framerate
  • -s size of output video
  • -pattern_type and -i is the input files
  • -vf (filters) scale=-2:2160 means scale proportionally to 2160 pixels high
  • -pix_fmt required for quicktime or some shit.

ffmpeg -r 24 -f image2 -s 3840x2160 -pattern_type glob -i "20220123_*.JPG" -vf "scale=-2:2160" -vcodec libx264 -crf 25 -pix_fmt yuv420p day2.mp4

@jonnolen
jonnolen / dm-x-bu-source-error.fixed.json
Created September 22, 2020 20:32
Deployment Manager Cross BU Example Snapshots
[{"componentPayloadVersion":1,"componentType":"DataExtension","clusterComponentKey":"DataExtension.2","created":"2020-09-22T18:05:10.884Z","component":{"dataRetentionProperties":{"isDeleteAtEndOfRetentionPeriod":false,"isRowBasedRetention":false,"isResetRetentionPeriodOnImport":false,"rowBasedThreshold":100000000},"description":"","devicePreferenceFieldName":"","name":"DM-X-BU-Source-Error","status":0,"fields":[{"description":"","isHidden":false,"isInheritable":false,"isNullable":false,"isOverridable":false,"isPrimaryKey":true,"isReadOnly":false,"isTemplateField":false,"length":50,"masktype":"None","mustOverride":false,"name":"Subscriber Key","ordinal":0,"storagetype":"Plain","type":"Text","clusterComponentKey":"DataExtension.field.4","idClusterComponentKey":"DataExtension.field.id.4"},{"description":"","isHidden":false,"isInheritable":false,"isNullable":false,"isOverridable":false,"isPrimaryKey":false,"isReadOnly":false,"isTemplateField":false,"length":254,"masktype":"None","mustOverride":false,"name":"Email
@jonnolen
jonnolen / turtles_demo.jsx
Created April 10, 2020 13:04
composing contexts... (i hate everything)
import React, { createContext, useContext } from 'react'
// this thing does the composition.
function TurtlesContextHOC (contexts) {
let [FirstContext, ...Rest] = contexts
return (props) => {
console.log('rendering the TurtlesContext', FirstContext)
if (Rest.length === 0) {
@jonnolen
jonnolen / .block
Created March 31, 2017 02:54 — forked from mbostock/.block
Multi-Series Line Chart
license: gpl-3.0
@jonnolen
jonnolen / .block
Last active March 29, 2017 17:08 — forked from mbostock/.block
General Update Pattern, I
license: gpl-3.0
@jonnolen
jonnolen / LICENSE.md
Last active March 31, 2017 15:57 — forked from tommaybe/LICENSE.md
Day / Hour Heatmap

Copyright (c) 2016, Tom May

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTH

@jonnolen
jonnolen / writeup.md
Last active September 10, 2016 03:51
Diagnosing unknown provider issues that occur during minification

Using ng-strict-di directive to find and kill unkown provider errors in minified code.

At commit bb14dc409f7521cb79498 if you load up the CHI end wiht minification on you'll get the following error:

Error: [$injector:unpr] Unknown provider: eProvider <- e

Here is how I used the ng-strict-di directive to find the cause. In this case the page was loading and data was being retrieved so I was able to zero in on it being something non-critical for page function, this led me to look for directives in the actual templates. I commented out the %toaster-output directive in chi.index.histor.html.haml and the error went away. However, when I looked into that directive I couldn't find any missing dependencies in between the $inject = [] and the actual function definitions.