Skip to content

Instantly share code, notes, and snippets.

Avatar
curl tiny.coffee

Rob Herley robherley

curl tiny.coffee
View GitHub Profile
View hubber.go
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"sort"
)
@robherley
robherley / status.go
Created Jun 7, 2022
GraphQL Status client for microplane
View status.go
const queryStatusCheckRollupState = `query($owner: String!, $name: String!, $oid: GitObjectID) {
repository(owner: $owner, name: $name) {
object(oid: $oid) {
... on Commit {
statusCheckRollup {
state
}
}
}
}
@robherley
robherley / 🥧.md
Created Apr 19, 2022
🧜‍♀️
View 🥧.md
%%{init: {'theme': 'base', 'themeVariables': { 'fontFamily': 'monospace', 'pieSectionTextSize': '24px', 'darkMode': true, 'pie1': '#2da44e', 'pie2': '#dbab0a', 'pie3': '#cf222e' }}}%%
pie title 🧪 GitHubActionsTestLogger.Tests
    "Passed" : 10
    "Skipped" : 2
    "Failed" : 1
@robherley
robherley / crc64.ts
Last active Apr 26, 2022
crc64 investigation
View crc64.ts
import fs from 'fs'
import crypto from 'crypto'
import * as Benchmark from 'benchmark'
// When transpile target to >= ES2020 (prob after dropping node 12) these can be changed to bigint literals
// ts(2737)
// Based on 0x9A6C9329AC4BC9B5 Polynomial from Azure Storage https://github.com/Azure/azure-storage-net
const TABLE = [
BigInt("0x0000000000000000"), BigInt("0x7F6EF0C830358979"), BigInt("0xFEDDE190606B12F2"), BigInt("0x81B31158505E9B8B"),
@robherley
robherley / instructions.js
Last active May 8, 2022
GB Instructions JSON to Go maps
View instructions.js
// https://gbdev.io/gb-opcodes/Opcodes.json
const { unprefixed, cbprefixed } = require("./Opcodes.json");
const opToCode = (mnemonic, op) => {
const name = op.name.toUpperCase();
// for hex used in RST
if (mnemonic === "RST" && name.endsWith("H")) {
return `byte(0x${name.slice(0, -1)})`;
}
@robherley
robherley / main.go
Last active Mar 17, 2022
Checking Chunk Uploads
View main.go
package main
import (
"crypto/md5"
"fmt"
"os"
)
const chunkSize = 8388608
View config.json
{
"cloudflare": [
{
"authentication": {
"api_token": "<omitted>"
},
"zone_id": "<omitted>",
"subdomains": ["*"],
"proxied": false
}
View bee_movie.txt
According to all known laws
of aviation,
there is no way a bee
should be able to fly.
Its wings are too small to get
its fat little body off the ground.
View checker.js
const axios = require("axios");
const _ = require("lodash");
const URL =
"https://am-i-eligible.covid19vaccine.health.ny.gov/api/get-providers";
const PAYLOAD = {
address: "11746",
applicationId: "5617632692458176706",
dob: "03/02/1997",
miles: "100",
View helios_puzzle.go
package main
import (
"fmt"
"image"
"image/color"
"image/png"
"os"
"github.com/nfnt/resize"