Skip to content

Instantly share code, notes, and snippets.

View ajhyndman's full-sized avatar

Andrew Hyndman ajhyndman

View GitHub Profile
@ajhyndman
ajhyndman / language wishlist.md
Last active May 21, 2025 17:25
Next Gen Frontend Language Wishlist

MUST

  • secure by default
  • immutable data (only)
    • number
    • text
    • list
    • tuple
    • dictionary (or some other struct?)
  • NO null (use unit instead)
@ajhyndman
ajhyndman / code-in-the-dark-15-07-2020.html
Created July 15, 2020 23:22
Code in the Dark @ Dropbox submission — Team Dinky Codepen Devs
<head>
<link
rel="stylesheet"
type="text/css"
href="https://dropbox-appbox-static.s3.amazonaws.com/static/css-reset.css"
/>
<link
rel="stylesheet"
type="text/css"
href="https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&display=swap"
@ajhyndman
ajhyndman / react-scripts+3.4.1.patch
Created June 15, 2020 22:11
Patch create-react-app to support configuration extensions
diff --git a/node_modules/react-scripts/config/webpack.config.js b/node_modules/react-scripts/config/webpack.config.js
index 25840d9..b5e210f 100644
--- a/node_modules/react-scripts/config/webpack.config.js
+++ b/node_modules/react-scripts/config/webpack.config.js
@@ -36,6 +36,7 @@ const typescriptFormatter = require('react-dev-utils/typescriptFormatter');
const getCacheIdentifier = require('react-dev-utils/getCacheIdentifier');
// @remove-on-eject-end
const postcssNormalize = require('postcss-normalize');
+const extendConfig = require('../../../webpack.config.extend')
2020-04-07 18:04:12 :: 2020-04-07 18:05:54 :: 102 :: mbzl itest-reload //services/metaserver/vault
2020-04-07 18:09:04 :: 2020-04-07 18:09:19 :: 15 :: mbzl itest-reload //services/metaserver/vault
2020-04-07 18:11:26 :: 2020-04-07 18:11:39 :: 13 :: mbzl itest-reload //services/metaserver/vault
2020-04-07 18:29:11 :: 2020-04-07 18:35:05 :: 354 :: mbzl itest-reload //services/metaserver/vault
2020-04-08 17:06:49 :: 2020-04-08 17:07:02 :: 13 :: [/Users/ahyndman/src/server] mbzl itest-reload //services/metaserver/vault
2020-04-08 17:52:29 :: 2020-04-08 17:54:42 :: 133 :: [/Users/ahyndman/src/server] mbzl itest-reload //services/metaserver/vault
2020-04-08 18:02:09 :: 2020-04-08 18:02:25 :: 16 :: [/Users/ahyndman/src/server] mbzl itest-reload //services/metaserver/vault
2020-04-09 17:24:55 :: 2020-04-09 17:25:16 :: 21 :: [/Users/ahyndman/src/server] mbzl itest-reload //services/metaserver/vault
2020-04-09 17:26:18 :: 2020-04-09 17:26:32 :: 14 :: [/Users/ahyndman/src/server] mbzl itest-reload //services/metaserver/
@ajhyndman
ajhyndman / asgi_flask.py
Last active June 12, 2019 16:50
ASGI to WSGI
from typing import Callable, Optional
from asgiref.sync import AsyncToSync
from flask import Request, Response
# The HTTP/1.1 spec is a little ambiguous, but defines that headers *should*
# only include ASCII characters. Existing server implementations in python all
# use 'latin-1' for full backward compatibility, but 'ascii' should be a
# sufficient subset for our use cases.
#
{
// Place your settings in this file to overwrite the default settings
"[javascript]": {
"editor.formatOnSave": false,
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
@ajhyndman
ajhyndman / .zshrc
Last active October 15, 2023 04:22
personal zsh config
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/Library/Android/sdk/platform-tools/:$PATH
export EDITOR="code --wait"
# list some files that should clear zgen's init script
ZGEN_RESET_ON_CHANGE=(${HOME}/.zshrc)
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
master_is_broken() {
pip install -r requirements.txt
pip install -r requirements_dev.txt
./manage.py migrate
./manage.py migrate --database=problems
psql mathspace_default -c "GRANT ALL ON schema public TO mathspace;"
psql mathspace_problems -c "GRANT ALL ON schema public TO mathspace;"
nvm use
rm -r node_modules
npm install
npm init
npm install --save-dev jspm
node_modules/.bin/jspm install
node_modules/.bin/jspm install react react-dom
node_modules/.bin/jspm install --dev babel-plugin-transform-react-jsx
# TODO: Add babel options to jspm.config.js
# "*.jsx": {
# "babelOptions": {
# "plugins": [
@ajhyndman
ajhyndman / count.js
Created May 14, 2016 16:10
ES6 Recursive Generator Counting
const count = function* (start, end) {
if (start < end) {
yield start;
yield* count(start + 1, end);
}
};
[...count(0, 10)].forEach(function (value) {
console.log(value);
});