Skip to content

Instantly share code, notes, and snippets.

View jreading's full-sized avatar

Johnny Reading jreading

View GitHub Profile
@staltz
staltz / introrx.md
Last active May 6, 2025 07:45
The introduction to Reactive Programming you've been missing
19:42 alexspeller: spenguin: imagine the controller layer as a spiderweb with flies on
19:42 alexspeller: spenguin: controllers are like the webbing and the struggling flies are your data
19:43 spenguin: right
19:43 alexspeller: spenguin: the routing layer is the spider. The spider responds to the weather (i.e. URL changes, user input, websocket events, etc etc) by moving flies around (setting controller content to various data)
19:45 alexspeller: due to convention a lot of this is automatic (hitting /posts/1 will find Post id 1 and set the model property of the PostController to that post for example) but it doesn't have to be automatic
19:45 alexspeller: you can override setupController to set the post model to a different controller or you can override model hook so PostRoute finds a different model or multiple models or no model
19:46 alexspeller: the strands of the web are "needs". They connect controllers together.
19:48 alexspeller: So don't get confused by thinking there should always be a 1:1 relatio
@mandiwise
mandiwise / Count lines in Git repo
Last active May 1, 2025 06:01
A command to calculate lines of code in all tracked files in a Git repo
// Reference: http://stackoverflow.com/questions/4822471/count-number-of-lines-in-a-git-repository
$ git ls-files | xargs wc -l
@mathiasbynens
mathiasbynens / web-platform-status-links.md
Last active February 8, 2025 12:35
Web platform status links
@dchowitz
dchowitz / es6-debugging-in-vscode.md
Last active August 30, 2023 06:23
Debugging ES6 in VS Code

Debugging ES6 in VS Code

My current editor of choice for all things related to Javascript and Node is VS Code, which I highly recommend. The other day I needed to hunt down a bug in one of my tests written in ES6, which at time of writing is not fully supported in Node. Shortly after, I found myself down the rabbit hole of debugging in VS Code and realized this isn't as straightforward as I thought initially. This short post summarizes the steps I took to make debugging ES6 in VS Code frictionless.

What doesn't work

My first approach was a launch configuration in launch.json mimicking tape -r babel-register ./path/to/testfile.js with babel configured to create inline sourcemaps in my package.json. The debugging started but breakpoints and stepping through the code in VS Code were a complete mess. Apparently, ad-hoc transpilation via babel-require-hook and inline sourcemaps do not work in VS Code. The same result for attaching (instead of launch) to `babel-node

@shortjared
shortjared / list.txt
Last active April 11, 2025 14:12
List of AWS Service Principals
a4b.amazonaws.com
access-analyzer.amazonaws.com
account.amazonaws.com
acm-pca.amazonaws.com
acm.amazonaws.com
airflow-env.amazonaws.com
airflow.amazonaws.com
alexa-appkit.amazon.com
alexa-connectedhome.amazon.com
amazonmq.amazonaws.com