Skip to content

Instantly share code, notes, and snippets.

View JeffML's full-sized avatar
🏠
Barely working

Jeff Lowery JeffML

🏠
Barely working
View GitHub Profile
export default function Editor(props) {
const { setEditing } = props;
return (
<Query query={LAUNCHES}>
{({ data, loading, error }) => {
if (loading) return <p>Loading...</p>;
if (error) return <p>ERROR</p>;
return (
<Fragment>
<Submit />
@JeffML
JeffML / heatmapdata.json
Last active August 21, 2019 23:09
example of data returned by jsheatmap
{
"headings": [
"Jun",
"Jul",
"Aug",
"Sep"
],
"high": 9,
"low": 4,
"rows": [
[
{
"label": "A",
"cells": {
"values": [
84.97,
63.49,
62.57,
61.63,
60.7,
@JeffML
JeffML / MillerRabinTest.js
Created November 16, 2021 00:35
Miller-Rabin test using BigInt
// Javascript program Miller-Rabin primality test
// based on JavaScript code found at https://www.geeksforgeeks.org/primality-test-set-3-miller-rabin/
// Utility function to do
// modular exponentiation.
// It returns (x^y) % p
function power(x, y, p)
{