Skip to content

Instantly share code, notes, and snippets.

Adam J Heller drfloob

Block or report user

Report or block drfloob

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 MISSING_NAME.java
private static final char[] ALPHABET = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
'0', 'a', 'b', 'c', 'd', 'e', 'f' };
private static final int LENGTH = 12;
public static String __MISSING_NAME__(final String s) {
final StringBuilder stringBuilder = new StringBuilder(s);
View app.js
var express = require('express');
var session = require('express-session')
var SQLiteStore = require('connect-sqlite3')(session);
var app = express();
app.use(session({
store: new SQLiteStore,
secret: "secret",
resave: false,
View whiteboardCleaner.md

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2

Results

View Analysis of the Craps Test from the Diehard test suite
# Dumb Guy's Statistical Analysis of the Diehard RNG Suite's Craps Test
## Test Description
Craps is a series of rolls of 2 dice, where you win on the first roll
when the sum of the dice is 7 or 11, or lose when it's 2, 3, or 12. If
you roll any other number on the first roll, that is the point you
have to make on subsequent rolls. If you hit that number again, you
win. Otherwise, if you roll 7 you lose.
View flag.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
You can’t perform that action at this time.