Skip to content

Instantly share code, notes, and snippets.

View justjake's full-sized avatar
🎉
🎉

Jake Teton-Landis justjake

🎉
🎉
View GitHub Profile
@justjake
justjake / swag.log
Created August 23, 2015 05:51
output of exeriment for compiling mardown to other markdown
> airbnb-style@2.0.0 script /home/justjake/src/javascript
> babel-node ./script/index.js
INPUT MARKDOWN TEXT:
# Destructuring
## Use object destructuring when accessing and using multiple properties of an object.
@justjake
justjake / fuck-me.js
Created August 26, 2015 08:21
4chan tried to make a monopoly game in a live codepad
// install gentoo
// https://boards.4chan.org/g/thread/49913571/so-g-has-never-made-a-project-in-their-lives-so
// http://codeshare.io/sqjc2
const clover = '//s.4cdn.org/image/buttons/burichan/watch_thread_off.png';
// @param {String} url - load image from here
// @return {Promise<Sprite>} herp derp
function loadSprite(url) {
return new Promise((resolve, reject) => {
const img = new Image();
@justjake
justjake / README.md
Created December 9, 2015 23:27
find bad packages in sinopia

Wat

I noticed a bunch of packages triggering [this npm@3 issue] because our Sinopia instance cached a number of packages. I wrote this script to find the bad packages on our server.

Usage

  1. npm install
  2. change the dataDir variable on line 3 of index.js to point to your Sinopia data directory
  3. run node ./index.js | grep BAD to list the bad packages
  4. rm -r those packages
@justjake
justjake / style-props.tsx
Last active October 29, 2019 00:11
Exploring building a CSS-in-JS system in Typescript
import { CSSProperties, Component } from "react"
/**
* Base types.
*/
/**
* A SheetProducer makes a sheet based on a context.
* Right now, the context only contains a `theme`.
*/
@justjake
justjake / server-preload.js
Last active January 29, 2024 16:56
Customizing NextJS for error reporting and Datadog APM (dd-trace) integration. See https://jake.tl/notes/2021-04-04-nextjs-preload-hack
// @ts-check
"use strict"
/**
* Set up datadog tracing. This should be called first, so Datadog can hook
* all the other dependencies like `http`.
*/
function setUpDatadogTracing() {
const { tracer: Tracer } = require('dd-trace')
const tracer = Tracer.init({