Skip to content

Instantly share code, notes, and snippets.


JR Heard jrheard

View GitHub Profile
View led_blink.ino
View starter_code.ino
// Welcome to Arduino!
// Here's a simple program to get you started driving your robot.
// We start by including the Servo library,
// which we'll be using to control the robot's wheels.
#include <Servo.h>
// Next, we declare a couple of Servo objects.
// Read on to see how these are actually used.
Servo servoLeft;
jrheard /
Created Apr 27, 2018
how to use hypothesis to generate "valid" passwords
import random
import string
from hypothesis import given
from hypothesis import settings
from hypothesis import strategies as st
import password_checker
View quinto_fdef_example.cljs
(s/fdef draw-tiles
:args (s/cat :deck ::sp/deck
:hand ::sp/hand
:num-tiles (s/and nat-int? #(<= % MAX-HAND-SIZE)))
:ret (s/cat :new-deck ::sp/deck
:new-hand ::sp/hand))
View quinto_specs.cljs
(s/def ::cell (s/cat :x nat-int? :y nat-int?))
(s/def ::value (s/and nat-int? #(<= % 9)))
(s/def ::deck (s/coll-of ::value))
(s/def ::hand (s/coll-of ::value :min-count 0 :max-count 5))
View reagent_example.cljs
(def cell-class (r/atom "red"))
(defn colorful-cell []
{:class @cell-class
:on-click #(if (= @cell-class "red")
(reset! cell-class "green")
(reset! cell-class "red"))}

Keybase proof

I hereby claim:

  • I am jrheard on github.
  • I am jrheard ( on keybase.
  • I have a public key whose fingerprint is 52CB 4C1F AB47 7FB7 BF8D 7C2F 560A 45C4 4A0F 1608

To claim this, I am signing this object:

View gist:1390621
for i in range(1, 100):
line = ""
if i % 3 == 0:
line += "Fizz"
if i % 5 == 0:
line += "Buzz"
if line == "":
line = str(i)