Skip to content

Instantly share code, notes, and snippets.

View codingcampbell's full-sized avatar

Matt Campbell codingcampbell

View GitHub Profile
@codingcampbell
codingcampbell / sudoku.c
Created October 5, 2020 14:12
Pretty fast sudoku board generator 👌
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#ifdef __MACH__
#include <time.h>
#else
#include <sys/auxv.h>
#endif
@codingcampbell
codingcampbell / lottery.js
Last active January 13, 2016 15:46
Lottery Simulator
// Run this file with `node lottery`
var quickPick = function() {
var cache = {}, white = [], num;
while (white.length < 5) {
do {
// White ball is a unique number between 1 - 69
num = Math.floor(Math.random() * 69) + 1;
} while (cache[num]);

Keybase proof

I hereby claim:

  • I am codingcampbell on github.
  • I am codingcampbell (https://keybase.io/codingcampbell) on keybase.
  • I have a public key whose fingerprint is 0172 6C28 32D3 7B8F 31F9 E19A 19E8 346C 728F F9C5

To claim this, I am signing this object: