Skip to content

Instantly share code, notes, and snippets.

View agwells's full-sized avatar

Aaron Wells agwells

View GitHub Profile
@agwells
agwells / readme.txt
Created March 7, 2026 02:47
single screen scream (Puzzlescript Next Script)
Play this game by pasting the script into https://puzzlescriptnext.polyomino.com/editor.html
@agwells
agwells / readme.txt
Created March 7, 2026 02:09
single screen scream (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@agwells
agwells / readme.txt
Created March 7, 2026 02:09
single screen scream (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@agwells
agwells / readme.txt
Created January 7, 2026 23:18
Transition (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@agwells
agwells / readme.txt
Created January 7, 2026 23:11
Transition (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@agwells
agwells / readme.txt
Created January 2, 2026 21:33
i herd u liek water templs (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@agwells
agwells / readme.txt
Created January 2, 2026 21:28
i herd u liek water templs (PuzzleScript Script)
Play this game by pasting the script in http://www.puzzlescript.net/editor.html
@agwells
agwells / gist:7068d4ce3d94aebcf57bef2993ec5b23
Last active August 15, 2025 01:09
Tiny seedable PRNG in JavaScript
/**
* A lightweight seedable RNG for generating low-quality random numbers.
*
* I find this mostly useful in testing and Storybook, where I want to
* repeatably generate a sequence of random numbers, but I don't need
* cryptographically strong randomness. It's only useful in those
* circumstances. Otherwise...
*
* - If it doesn't need to be repeatable, just use JS's native "Math.random()"
* - If it needs to be cryptographically strong, import a reliable PRNG package
@agwells
agwells / gist:bd3f237879a39e76f12a0cb42f1c2fcf
Last active August 1, 2021 22:29
Manually setting up an npm auth token (without using `npm login`)

I was annoyed to find tha the NPM website lets you generate auth tokens manually, but does not provide any instructions on how to configure them in your local workspace. The only instructions are to give your username and password to npm login, which will then configure our workspace.

But all npm login does is pop the token into some annoyingly undocumented config fields in ~.npmrc. You can just as easily do this manually, if you would rather not type your password into a terminal script.

  1. Log in to the NPM website and generate an auth token.
  2. Put it in your ~/.npmrc file like so:
//registry.npmjs.org/:_authToken=YOUR-TOKEN-WOULD-GO-HERE
@agwells
agwells / webpack.cra-ssr.js
Created February 19, 2020 10:35
Webpack config to compile Create React App code to execute in Node
const path = require('path');
const nodeExternals = require('webpack-node-externals');
const NodemonPlugin = require('nodemon-webpack-plugin');
// Directory the compiled SSR server and assets will go in
const SSR_BUILD_PATH = './ssr-build'
const originalNodeEnv = process.env.NODE_ENV;
// This must be "production" for the CRA webpack config to be correct.