Skip to content

Instantly share code, notes, and snippets.

@hernan43
hernan43 / annoy-o-bug.ino
Last active April 28, 2018 21:42
I took various bits and pieces from the included projects and combined them to create an Annoy-O-Bug that conserves power by using the ATTiny85's built in watchdog timer.
/*
ATTiny85 Annoy-O-Bug
This is equal parts:
https://create.arduino.cc/projecthub/arjun/programming-attiny85-with-arduino-uno-afb829
https://www.hackster.io/AlexWulff/the-annoy-o-bug-a-chirping-light-up-throwie-37e58a
https://github.com/sparkfun/H2OhNo/blob/master/firmware/WatchDogTest/WatchDogTest.ino
https://github.com/SpenceKonde/ATTinyCore
@cantino
cantino / base64-md5-test.rb
Created February 28, 2019 23:41
Four ways to compute the base64 md5 checksum used by ActiveStorage
require 'digest'
# From activestorage
def compute_checksum_in_chunks(io)
Digest::MD5.new.tap do |checksum|
while chunk = io.read(5242880)
checksum << chunk
end
io.rewind
end.base64digest