Skip to content

Instantly share code, notes, and snippets.

View balupton's full-sized avatar
🏍️
Travelling for next 2 weeks

Benjamin Lupton balupton

🏍️
Travelling for next 2 weeks
View GitHub Profile
@balupton
balupton / understanding-society.md
Last active July 15, 2020 21:10
Understanding Society

Understanding Society

A talk, book, and series of posts to write.

  1. How to Read A Book
  2. Normativeness and Tolerance
    1. Bullying
      1. Political Correctness is bullying at the Telos
        1. Intolerant Tolerance
  3. Insensible Sensitivities
@colllin
colllin / Readme.md
Last active February 21, 2024 14:55
FaunaDB User Token Expiration (for ABAC)

Auth0 + FaunaDB ABAC integration: How to expire Fauna user secrets.

Fauna doesn't (yet?) provide guaranteed expiration/TTL for ABAC tokens, so we need to implement it ourselves if we care about it.

What's in the box?

3 javascript functions, each of which can be imported into your project or run from the command-line using node path/to/script.js arg1 arg2 ... argN:

  1. deploy-schema.js: a javascript function for creating supporting collections and indexes in your Fauna database.
@kitsonk
kitsonk / bronto.ts
Last active August 10, 2022 12:03
Example Deno Static Server
import {
green,
cyan,
bold,
yellow,
red
} from "https://deno.land/std@v0.20.0/fmt/colors.ts";
import {
Application,
@colllin
colllin / Readme.md
Last active August 11, 2020 03:03
Auth0 + FaunaDB integration strategy

Goal

Solutions

At the very least, we need two pieces of functionality:

  1. Create a user document in Fauna to represent each Auth0 user.
  2. Exchange an Auth0 JWT for a FaunaDB user secret.
@bvaughn
bvaughn / index.md
Last active April 19, 2024 04:34
How to use profiling in production mode for react-dom

React recently introduced an experimental profiler API. This page gives instructions on how to use this API in a production release of your app.

Table of Contents

Profiling in production

React DOM automatically supports profiling in development mode for v16.5+, but since profiling adds some small additional overhead it is opt-in for production mode. This gist explains how to opt-in.

@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

One of Newscorp's most heavily used data platforms, TCOG, is beginning a rebuild.

TCOG has 6 deployments taking high web traffic to deliver digital content for some of Australia's most downloaded sources of news and media.

The TCOG service loosely fits into a 'backend for the frontend' pattern that provides an API to front end clients to transform and render data from one or more upstream APIs by "smart URLs". See http://samnewman.io/patterns/architectural/bff/ for more information about the pattern.

Over time, the TCOG service has become monolithic. We have designed TCOG 1.5, which will consist of smaller services. We want you to help us build them! This project is a mixture of refactoring the existing and working on greenfield solutions to known problems. The new architectural direction is focussed on service patterns for caching, rendering and data transformation.

In addition, regular BAU work requires communication and support for the surrounding developers who build TCOG extensions to service the

@AgentOak
AgentOak / youtube_formats.md
Last active April 24, 2024 09:38
Youtube Format IDs

Last updated: April 2021

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

Resolution AV1 HFR High AV1 HFR AV1 VP9.2 HDR HFR VP9 HFR VP9 H.264 HFR H.264
MP4 MP4 MP4 WebM WebM WebM MP4 MP4
@tam7t
tam7t / certdump.go
Created September 1, 2016 19:02
certdump consul-template plugin for writing vault-generated certificates to separate files
package main
import (
"io/ioutil"
"log"
"os"
"os/user"
"strconv"
)
@JonCole
JonCole / Redis-BestPractices-General.md
Last active April 18, 2024 07:57
Redis Best Practices

Some of the Redis best practices content has moved

This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.

NOTE: Client specific guidance listed below is still valid and should still be considered. I will update this document once all content has been moved.