Skip to content

Instantly share code, notes, and snippets.

Avatar

Joshua Bradley joshuabradley012

View GitHub Profile
@joshuabradley012
joshuabradley012 / Object collisions with canvas
Last active Sep 12, 2021
An example of 2D collisions using JavaScript Canvas
View Object collisions with canvas
class State {
constructor(display, actors) {
this.display = display;
this.actors = actors;
}
update(time) {
/**
* provide an update ID to let actors update other actors only once
View SDC: deployed proxy RPS
# Executed 1000 requests per second for 1 minute from ids 9000000-9999999
##
# Before caching
##
# loader.io config
Test type: Clients per second
Clients: 1000
Duration: 1 min
View SDC: proxy RPS
# Executed 1000 requests per second for 10 seconds using 1000000 different IDs
# Artillery config
config:
target: 'http://localhost:6002'
phases:
- duration: 10
arrivalRate: 1000
payload:
path: "ids.csv"
View workspace-description-api-response.json
// GET http://localhost:6060/api/workspace-description/1
{
"_id": "600c6ced99960c647ffae467",
"id": 1,
"name": "Coloring book schlitz paleo selvage direct trade",
"url": "coloring-book-schlitz-paleo-selvage-direct-trade",
"descriptionHeadline": "Wolf thundercats taxidermy authentic tumeric prism put",
"description": "Coloring book schlitz paleo selvage direct trade cred pok pok copper mug slow-carb YOLO kombucha jianbing taxidermy chicharrones subway tile. Wolf thundercats taxidermy, authentic tumeric prism put a bird on it fashion axe woke hashtag. Hell of farm-to-table everyday carry waistcoat ethical pour-over. Lomo cred iceland yr skateboard. Art party keffiyeh health goth plaid adaptogen pickled. Selvage vaporware fingerstache yr pop-up, bicycle rights neutra. Authentic locavore readymade YOLO four loko, XOXO butcher whatever shaman.",
"__v": 0
View LISP in Arc
(def _null (x)
(is x nil))
(def _and (x y)
(if (is x t) (is y t) t nil))
(def _not (x)
(if (is x nil) t))
(def _caar (x)