Skip to content

Instantly share code, notes, and snippets.

Dustin Sallings dustin

Block or report user

Report or block dustin

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View dps-box.stl
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View nma.hs
{-# LANGUAGE OverloadedStrings #-}
module NMA where
import Control.Lens
import Control.Monad (guard)
import Data.Semigroup ((<>))
import Network.Wreq (post, FormParam(..), responseBody, responseStatus, statusCode)
import Text.Read (readEither)
import qualified Data.ByteString as BS
dustin / Dockerfile
Created Nov 1, 2017
Dockerfile for arm linux haskell build environment.
View Dockerfile
# FROM arm32v7/debian:stretch
FROM resin/rpi-raspbian:stretch
RUN apt-get update
RUN apt-get install -y netbase curl llvm-3.7 # haskell-stack
RUN curl -sSL | sh
COPY stack-entry /bin/stack-entry
VOLUME /root
View cura-pla.ini
layer_height = 0.2
wall_thickness = 1.2
retraction_enable = True
solid_layer_thickness = 0.9
fill_density = 15
print_speed = 40
print_temperature = 200
print_temperature2 = 0
print_temperature3 = 0
View ...and results with inlining disabled:
$ go test -gcflags=-l -bench=.
testing: warning: no tests to run
BenchmarkDirect-4 500000000 3.36 ns/op
BenchmarkInterface-4 1000000000 3.46 ns/op
ok misc/intb 5.830s
View timeout.c
volatile bool tx_sumd = false;
volatile bool timedout = false;
// Set tx_sumd = true every 10ms
void initSUMDTimer() {
TCCR1A = 0;
TCCR1B = 0;
TCNT1 = 0;
View categorizer.go
package main
import (
dustin /
Last active Aug 29, 2015
WS2812 demo with 13 LEDs
dustin /
Last active Aug 29, 2015
WS2812 Capture from strandtest
dustin /
Last active Aug 29, 2015
WS2812 Capture from strandtest
You can’t perform that action at this time.