Skip to content

Instantly share code, notes, and snippets.

View bokmann's full-sized avatar

David Bock bokmann

View GitHub Profile
https://www.dcode.fr/caesar-cipher
Wkh wzr zruvw Pduyho yloodlqv duh Wkdqrv dqg Ornl
https://www.dcode.fr/monoalphabetic-substitution
EO EB M YXFETN TV ZEQER GMF.
FXLXR BYMZXBKEYB, BOFECEWS
@bokmann
bokmann / browniechew.md
Last active April 28, 2023 01:27
Javaguy's Chewy Brownie Manifesto

For about 2 months I've been making brownies. I've consulted dozens of cookbooks, websites, and TV shows looking for the ultimate chewy brownie recipe. I think I have constructed it from several sources:

  1. James' Beard's 1972 American Cookery
  2. Cooks Illustrated "The Science of Good Cooking"
  3. Good Eats Reloaded "Art of Darkness II"

Elements of this recipe are taken from all three sources, along with testing in my own kitchen. I still have more tests of this recipe to do before I call it 'final', but enough people have been asking for it I've decided to share it as a 'beta brownie'.

Brownies fall someplace in the 'brownie triangle' between cakey, chewy, and fudgy. IMHO, brownies are the only true form to get 'chew' out of a baked good beyond a pizza crust... if I want cake I'll eat that. So I want something on the fudgy/chewy side of the triangle, leaning toward the chew. I've pulled every trick I can find from every cookbook to get that to work.

Keybase proof

I hereby claim:

  • I am bokmann on github.
  • I am bokmann (https://keybase.io/bokmann) on keybase.
  • I have a public key ASC0rVKIk0CgFYKyZw5fX99-1eWbAdPz6nwitYLIVQeO-go

To claim this, I am signing this object:

@bokmann
bokmann / rake_snippet.rb
Last active August 29, 2015 14:28
Created as a snipper to share with Avdi.
# once upon a time these rake tasks were in use in my house. I had a program that would scrape my kids
# TV shows off of my tivo as they were recorded and dump them in a directory. Of course, they had tivo's
# encryption on them. the 'decode' task transcoded them to mp4 and moved them to a different directory,
# and the 'publish' task would copy them to a generation one Apple TV (the one with the 40 gig hard drive).
# My kids then had a never-ending source of Dora and Dinosaur Train, and I had vital space on my Tivo for
# things like "The Walking Dead". With a parental code in my Tivo, my kids' shows were sandboxed in a
# safe place.
#
# I presented this code as an example of automation in a conference talk done several times, and this code
# was actually taken off of a slide used for that talk. As such, the original code was a little longer
@bokmann
bokmann / the_daycare.txt
Last active April 2, 2017 11:43
This problem was originally in the 2015 VCU Computer Science Competition
Problem A The Daycare
The daycare Nannies R Us has installed a new high-tech system for keeping track of which children are under
its supervision at any moment in time. Each parent of a child has a card with a unique ID, where the ID is
some integer x. Every morning, the parent swipes the card at a card-reader when dropping their child off at
the daycare. The system then adds x to an array of integers. In the evening, when the parent comes to pick
up the child, the same card is swiped, and a second copy of x is added to the list. Each night at midnight,
the array is wiped clean and reset to have zero elements. In this way, the daycare can quickly check every
afternoon which children are yet to be picked up by their parents by picking out the array elements that
occur precisely once. Unfortunately, at 4:55 pm on Friday, March 13, 2015, the daycare realizes that
somewhere in their daycare is precisely one child who is yet to be picked up – can you help them determine
@bokmann
bokmann / knockknockinator.rb
Last active August 29, 2015 14:25
This is a work-in-progress. This is an example for students to learn the nature of using state in a class using instance variables. This could also break into an example of why threading is complicated, but thats not the first point of this example.
The KnockKnockinator
We're going to write a class that listens to and responds to knock knock jokes.
An interaction with this class should look like this:
> inator = KnockKnockInator.new
> response = inator.hears("Knock Knock")
@bokmann
bokmann / gas_vs_petrol.txt
Last active August 29, 2015 14:25
The "Gasoline vs. Petrol" Exercises
These are three exercises that deal with the thought process of converting data from one format to another,
a problem we enounter often in software development. The last problem is about publishing this data, both
as a website and as a webservice that publishes json. Tackling that problem will make you think about
various things like "how do we get the data off of the websites we're referencing?" and "when do we update
that data?" that can lead to great architectural and structural conversations.
Exercise #1:
@bokmann
bokmann / suggestions.md
Last active August 29, 2015 14:11
worst_language_ever
require 'io/console'
# Reads keypresses from the user including 2 and 3 escape character sequences.
def read_char
STDIN.echo = false
STDIN.raw!
input = STDIN.getc.chr
if input == "\e" then
input << STDIN.read_nonblock(3) rescue nil
@bokmann
bokmann / C4Board.rb
Last active January 1, 2016 18:49
A Connect Four Coding Challenge form my talk series, "What Computer Scientists Know"
# This is an example Connect Four board. It is a data structure
# that represents the current state of the board game; the colors
# of pieces already in position, the current player to move, and
# also supplies a 'move(x)' method, where you just specify the
# column to drop a piece in; the board will automatically 'drop'
# the piece to the next available position, set the player to
# the opponent, and return a brans new instance of the board.
#
# This may seem strange to those of you who have not written
# board game playing apps before, but it is common practice to make