Skip to content

Instantly share code, notes, and snippets.

View canadaduane's full-sized avatar

Duane Johnson canadaduane

View GitHub Profile
@canadaduane
canadaduane / rust-output.txt
Created January 15, 2018 23:32
Can't compile diesel app--what am I missing?
error[E0277]: the trait bound `i64: diesel::deserialize::FromSql<diesel::sql_types::Nullable<diesel::sql_types::BigInt>, _>` is not satisfied
--> src/main.rs:32:10
|
32 | .load::<db::models::Device>(&connection)
| ^^^^ the trait `diesel::deserialize::FromSql<diesel::sql_types::Nullable<diesel::sql_types::BigInt>, _>` is not implemented for `i64`
|
= help: the following implementations were found:
<i64 as diesel::deserialize::FromSql<diesel::sql_types::BigInt, DB>>
const int rstPin = 7;
void setup() {
pinMode(rstPin, OUTPUT);
// DDRD |= (1 << PD7);
}
void loop() {
// RESET pin goes HIGH

Keybase proof

I hereby claim:

  • I am canadaduane on github.
  • I am canadaduane (https://keybase.io/canadaduane) on keybase.
  • I have a public key ASBsu9K9oqFyQ0F0ps3jeBbyffBFMUv1t0a9uzccaVflfwo

To claim this, I am signing this object:

@canadaduane
canadaduane / kicad_crash.txt
Created August 16, 2016 18:51
kicad nightly build crash [kicad-r7009.20160807-035111.dmg]
Process: kicad [74680]
Path: /Applications/Kicad/kicad.app/Contents/MacOS/kicad
Identifier: org.kicad-pcb.kicad
Version: ??? (???)
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: kicad [74680]
User ID: 501
Date/Time: 2016-08-16 12:50:16.303 -0600
@canadaduane
canadaduane / thoughts-on-ocaml.md
Created July 20, 2016 17:21
Thoughts on OCaml

I subscribed to caml-list for a few weeks. I didn't find the discussions intersected with my learning needs. For instance, much of the teaching in the OCaml community appears to be classroom-oriented. I saw at least 3 conferences or workshops announced, and a MOOC, but no github lesson pages (for lack of a better term) or blogs with source code examples oriented toward beginners. Discussion seemed to be focused on the language itself, and not on how to use the language to get work done (e.g. metaplugins, ppx, let rec).

My impression is that the community sets a high bar for inclusion (i.e. an academic) and that the target audience for most papers, announcements, and conferences is not "someone coming from another language or programming paradigm".

I was also disappointed to see how much resistance there was to trying new things to compete in the language mindshare space--I left with the impression that most OCaml programmers are satisfied with the way things are, and the costs outweigh the benefits in tryin

@canadaduane
canadaduane / 360bestbuy-kossel-xl.md
Last active March 28, 2016 20:52
Review of 360bestbuy Kossel XL from AliExpress

Review of 360bestbuy Kossel XL from AliExpress Purchased: Mar 7, 2016

Overall rating: 2/5 stars Update: 3/5 stars

As a seasoned DIY 3D printer enthusiast, I was excited to try the 360bestbuy Kossel XL. It was shipped almost immediately after I ordered it and it arrived very quickly in the USA--3 days. It appeared at first that there were no assembly instructions, but after messaging 360bestbuy, it turns out they have PDF files on the SD Card included in the box. The instructions are adequate, but not great--I had to refer to other guides online to understand how to attach the endstops for instance.

The printed parts are of excellent quality, and the frame is precise and sturdy. The carbon fiber legs that hold the hotend were sized precisely.

Unfortunately, there were several major issues as well: the M4 square nuts meant to be used with the aluminum extrus

@canadaduane
canadaduane / gist:9b37b43078ce28c53814
Created March 16, 2015 18:14
webpack node-sass error
$ fig up webpack
Recreating firesize_webpack_1...
Attaching to firesize_webpack_1
webpack_1 | nodejs v0.10.33
webpack_1 | npm WARN package.json firesize@0.2.0 No repository field.
webpack_1 |
webpack_1 | > node-sass@2.0.1 install /app/node_modules/sass-loader/node_modules/node-sass
webpack_1 | > node scripts/install.js
webpack_1 |
webpack_1 |
@canadaduane
canadaduane / test-ideas.js
Created March 4, 2015 15:58
Ideas for making testing in react/js easier
/*
Some of the pains I'm experiencing in testing JS:
- subject "appears out of nowhere" (as do "describe", "it", and "assert")
- it isn't clear what methods are available on subject
- stubs must happen outside of tests
- stubs take up a lot of space in test files
- stub methods require the developer to think about whether it's a class or component
- stubs require outside-scope closure capture of variable to be used in tests
- it isn't lexically clear where the stubbing "ends", e.g. the life cycle of a stubbed class method
- mountComponent doesn't automatically unmount?
@canadaduane
canadaduane / question.md
Created January 2, 2015 04:38
Question for archive.org team

I'm curious if there has been any attempt to calculate a "scan quality" measure for the OCRed books in the archive. I deal frequently with data from the period 1700-1830 and I notice a wide variety in quality. Ideally, I'd like a "scanquality" property that I could set parameters for in a search.

I've implemented something like this for books that I've downloaded from archive.org, but it seems like it would be useful for all patrons of archive.org to have this metadata. Has implementing an algorithm like this been talked about? How interesting is it, and if interesting, with whom should I speak to develop something like this?

@canadaduane
canadaduane / slc_city_council.md
Created November 18, 2014 22:49
RideShare.opinion.txt

While the UTA provides increasingly better transit for our residents, and cabs provide a useful service, there is still a wide gap between "drive-yourselfers" and "public transiters". Shared rides with a hybrid for-pay model (à la Lyft) is an important new option for Salt Lake City that reduces traffic congestion and pollution. Please keep this option affordable as we explore new and innovative solutions to Utah's transit needs.