Skip to content

Instantly share code, notes, and snippets.

View joshumax's full-sized avatar
🎯
Focusing

Josh Max joshumax

🎯
Focusing
View GitHub Profile
@joshumax
joshumax / joshassert.h
Last active January 20, 2019 05:30
JoshAssert
/**
* JoshAssert, by Josh Max
*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <math.h>
#define N_BOX_ROWS 4
#define N_BOX_COLS 4
#define KEY_SIZE 4
#define N_KEYS 2
/**
* Created by Josh Max on 10/12/18
*/
#include <cmath>
#include <iostream>
#include <vector>
#include <sched.h>
#include <chrono>
#include <map>
#include <stdio.h>
#include <stdint.h>
#define ITERATIONS 85
typedef struct {
uint64_t previous;
uint64_t current;
} numpair;
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
typedef union
{
struct {
char upper[2];
char lower[2];
} segments;
@joshumax
joshumax / LetsGetLucky.sh
Last active January 13, 2016 22:30
Powerball Quick-pick Number Generator
#!/bin/sh
for i in `seq 1 6`; do num=`dd if=/dev/random bs=1 count=1 2>/dev/null | od -An -t d | sed 's/\s\+//g'`; if [ $i -eq 6 ]; then expr $num % 26 + 1; else expr $num % 69 + 1; fi; done
@joshumax
joshumax / TransMacError.txt
Created January 5, 2016 02:06 — forked from anonymous/TransMacError.txt
TransMac "could not access drive"
Getting TransMac working in Windows 10:
* Formatting drive for Mac fails with "could not access drive"
* Opened Procmon
- CreateFile fails with ERROR_SHARING_VIOLATION
* Opened Procexp
- Find Handle/DLL
- Searched \Devices\Harddisk1
* Realized it was Paragon ext4 driver for Windows locking all drives
- Wow I am an idiot
@joshumax
joshumax / keybase.md
Created April 12, 2015 18:07
keybase.md

Keybase proof

I hereby claim:

  • I am joshumax on github.
  • I am joshumax (https://keybase.io/joshumax) on keybase.
  • I have a public key whose fingerprint is 372F EF35 1922 5C89 A449 2145 E657 F54A 65F5 A6A2

To claim this, I am signing this object: