Skip to content

Instantly share code, notes, and snippets.

import os
import json
from sendgrid import SendGridAPIClient
from sendgrid.helpers.mail import Mail
import requests
import time
url = "https://home.color.com/api/v1/sample_collection_appointments/availability?claim_token=7a4da7f7181ef9d06ef87df9872731e67c39&collection_site=Embarcadero"
# Go to https://home.color.com/covid/sign-up/start?partner=sfdph
# Complete it once, and then look at the XHR sent to the URL above

Keybase proof

I hereby claim:

  • I am joshma on github.
  • I am joshma (https://keybase.io/joshma) on keybase.
  • I have a public key ASAabcGbH5TL5q-TImRtPTd1ATuXo1T_KTWcBiP3zaZXQgo

To claim this, I am signing this object:

diff --git i/example.js w/example.js
index ba2427a..2edc85e 100644
--- i/example.js
+++ w/example.js
@@ -11,10 +11,13 @@ const TodoItem = React.createClass({
id: React.PropTypes.number.isRequired,
}).isRequired,
},
+ deleteItem() {
+ this.props.deleteItem(this.props.item.id);
@joshma
joshma / WhyDidYouUpdateMixin.js
Last active May 9, 2018 06:17
Performance Engineering with React (Part 2)
/* eslint-disable no-console */
import _ from 'underscore';
/*
Drop this mixin into a component that wastes time according to Perf.getWastedTime() to find
out what state/props should be preserved. Once it says "Update avoidable!" for {state, props},
you should be able to drop in React.addons.PureRenderMixin
React.createClass {
mixins: [WhyDidYouUpdateMixin]
@joshma
joshma / gist:9963528
Created April 3, 2014 21:45
chartbeat.js bug
Hi there,
We've been noticing errors coming from chartbeat.js: "Object #<SVGAnimatedString> has no method 'replace'" - I took a moment to diagnose the issue and found the error to arise when you click on an SVG node with an HREF attribute. It looks like there's a click handler for anchor tags that isn't aborting when the SVG node is clicked:
r.W = function(a) {
var b, c;
if (a = a || window.event) {
c = a.target || a.srcElement;
if (c.tagName !== "A")
if (c.parentNode)

Keybase proof

I hereby claim:

  • I am joshma on github.
  • I am joshma (https://keybase.io/joshma) on keybase.
  • I have a public key whose fingerprint is 4B49 F919 3CDB 553A 4575 A216 C9D7 FFE5 713A 164F

To claim this, I am signing this object:

@joshma
joshma / broken_test.py
Created March 11, 2014 02:57
Flask-Testing appears to not remove session in between client requests
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.testing import TestCase
app = Flask(__name__)
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:////tmp/test.db'
db = SQLAlchemy(app)
@app.route('/')
def index():
u = db.session.query(User).first()
(function () {
var g = void 0,
h = !0,
i = null,
l = !1,
aa = encodeURIComponent,
ba = Infinity,
ca = setTimeout,
da = isNaN,
m = Math,
@joshma
joshma / gist:5084679
Created March 4, 2013 19:20
Variable declarations in JS
var a = 0;
(function() {
var f = function() {
console.log(a);
};
f();
})(); // 0
var b = 0;
(function() {