Skip to content

Instantly share code, notes, and snippets.

View wraithgar's full-sized avatar

Gar wraithgar

  • GitHub Staff
  • Tri-Cities, WA
View GitHub Profile
#!/usr/bin/env node
const https = require('node:https')
const es = require('event-stream')
const JSONStream = require('JSONStream')
const main = async () => {
const r = []
for (let i = 0; i < 10; i++) {
r.push(new Promise((resolve, reject) => {
if (process.argv[2] === 'stream') {
const breads = [
['toast','pieces of toast'],
['muffin','muffins'],
['teacake','teacakes'],
['bun','buns'],
['bap','baps'],
['baguette','baguettes'],
['bagel','bagels'],
['croissant','croissants'],
['crumpet','crumpets'],
@wraithgar
wraithgar / nespad.a86
Created February 6, 2023 15:57
nes pad DOS driver
.radix 16
org 100
clockoff equ 000000xb
pad_init equ 001001xb
pad_clockon equ 010010xb
pad_power equ 100100xb
@wraithgar
wraithgar / example.txt
Created January 12, 2023 15:38
npm pick manifest example
> pick = require('npm-pick-manifest')
[Function (anonymous)]
> packument
{
name: 'some-package',
'dist-tags': { foo: '1.0.1' },
versions: {
'1.0.0': { version: '1.0.0' },
'1.0.1': { version: '1.0.1' },
'1.0.2': { version: '1.0.2' },
@wraithgar
wraithgar / npm-cli-autorelease-prs.graphql
Last active December 6, 2022 22:26
graphql dependabot open issues query
query {
search (query: "org:npm topic:npm-cli", type: REPOSITORY, first:100) {
nodes {
... on Repository {
nameWithOwner
pullRequests (labels: ["autorelease: pending"], first:100, states: [OPEN]) {
nodes {
number
url
title
console.log(require('./package.json'))
@wraithgar
wraithgar / main.js
Last active July 21, 2022 17:55
npm exec gist
#!/usr/bin/env node
const pkg = require('./package.json')
console.log(`Hi there! I am ${pkg.name} version ${pkg.version}`)
@wraithgar
wraithgar / all-highest.js
Last active February 28, 2022 19:34
batch latest versions for a given npm package
'use strict'
const pacote = require('pacote')
const fetch = require('npm-registry-fetch')
const semver = require('semver')
const perRequest = 10
async function main() {
const manifest = await pacote.manifest(process.argv[2])
@wraithgar
wraithgar / instructions.txt
Created December 16, 2021 18:17
github graphql contributions query
// https://docs.github.com/en/graphql/overview/explorer
@wraithgar
wraithgar / broken
Last active October 20, 2021 18:48
Weird bedrock subchunk
version 9 subchunk with only one block?
09 01 04
[] sub_chunk_version = 9
[] num_storages = 1
[] sub_chunk_index = 4
00 00
!! !! two empty bytes !!
nbt
0a 00 00 08 04 00 6e616d65 13006d696e6563726166743a73... (nbt continues)