Companies building interesting things. No specific order.
- Vercel
- Stripe
- Coinbase
- WorkOS
- Substack
- Render
- Figma
- Retool
import fetch from "node-fetch" | |
import sanityClient from "@sanity/client" | |
import * as fs from "fs" | |
import { fetchAPI } from "./fetchApi" | |
import gql from "graphql-tag" | |
const API_URL = "[add yours here]" | |
export async function fetchAPI(query, { variables = null } = {}) { | |
const QUERY = typeof query === "string" ? query : query?.loc.source.body |
Companies building interesting things. No specific order.
/* Get 12 most recent instagram thumbnails from a public account | |
* resolution = 0 - 4 | |
* 0 => 150 | |
* 1 => 240 | |
* 2 => 320 | |
* 3 => 480 | |
* 4 => 640 | |
*/ | |
export default function(username, resolution = 4) { | |
return fetch(`https://www.instagram.com/${username}/?__a=1`) |
#!/bin/bash | |
# Generate a `:something-intensifies:` Slack emoji, given a reasonable image | |
# input. I recommend grabbing an emoji from https://emojipedia.org/ | |
set -euo pipefail | |
# Number of frames of shaking | |
count=10 | |
# Max pixels to move while shaking |
"use strict"; | |
[foo,bar] = TNG(foo,bar); | |
// NOTE: intentionally not TNG(..) wrapping useBaz(), so that it's | |
// basically like a "custom hook" that can be called only from other | |
// TNG-wrapped functions | |
function foo(origX,origY) { | |
var [x,setX] = useState(origX); | |
var [y,setY] = useState(origY); |
#!/usr/bin/env python | |
''' | |
Simple and functional REST server for Python (3.5) using no dependencies beyond the Python standard library. | |
Ported from original lib for Python 2.7 by Liron (tliron @ github.com) https://gist.github.com/tliron/8e9757180506f25e46d9 | |
Features: | |
* Map URI patterns using regular expressions | |
* Map any/all the HTTP VERBS (GET, PUT, DELETE, POST) | |
* All responses and payloads are converted to/from JSON for you | |
* Easily serve static files: a URI can be mapped to a file, in which case just GET is supported |
import React, { Component } from "react"; | |
import get from "utils/get"; | |
// Use extend ContainerBase in your Route Containers and use | |
// the provided lifecycle hooks to load data. This way you'll | |
// have a predictable edge to know when data is loaded for your | |
// Route - super useful for serverside rendering your app! | |
class ContainerBase extends Component { | |
state = { |
html { box-sizing: border-box } | |
*, *:before, *:after { box-sizing: inherit; } | |
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } | |
body, h1, h2, h3, h4, h5, h6, p, ol, ul { | |
margin: 0; | |
padding: 0; | |
font-weight: normal; | |
} |
Smallest possible CSS-in-JS library.