Skip to content

Instantly share code, notes, and snippets.

You’ll hear this talk at Elm Europe in June 2017. Massive thanks to @chrisui, @stealthpig, @zsoobhan, @spryle, @dumbNickname and everyone else who helped shape this proposal. You guys are awesome!

 

how frontend microservices
help us stay flexible

Choosing the right technologies when starting a project is super important. It’s almost impossible to change the stack later on. Betting on Elm is therefore a bit risky. Right?

Not anymore! Now we can use frontend microservices to pick the right tool for every job!

The Story of NPM and Yarn

In the beginning there was NPM, and for a time it was good. Packages went forth and multiplied. The New Gods proclaimed the great demon Dependency Management had been slain. But The Old Gods knew better, for they had seen much and knew that the demon can never be killed, only held at bay.

The Old Gods were ignored. In the folly of a young age grew an abundance of packages and with them grew the scourge of dependency. In the depths beneath the earth, in a place beyond memory, the great demon stirred.

The first sign something was wrong was non-deterministic package version mismatches. “This is fine!” The New Gods declared. “A temporary setback, nothing more! We can fix it.” And so they introduced shrinkwrap, a lamp to combat the growing darkness.

But it proved to be too little, too late, and dusk continued to fall. The New Gods suffered their first major defeat at the [Battle of Left-pad](https://www.theregister.co.uk/2016/03/23/npm_left_

@DusanMadar
DusanMadar / TorPrivoxyPython.md
Last active October 10, 2025 04:58
A step-by-step guide how to use Python with Tor and Privoxy

A step-by-step guide how to use Python with Tor and Privoxy

Latest revision: 2025-07-24.

Tested on Ubuntu 24.04 Docker container. The Dockerfile is a single line FROM ubuntu:24.04. Alternatively, you can simply run docker run -it ubuntu:24.04 bash.

NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>) after each failed service <service name> stop to kill it.

References

@sibelius
sibelius / MutationUtils.js
Created March 19, 2018 10:20
Helper methods for Relay Modern updater
// @flow
import { ConnectionHandler } from 'relay-runtime';
import { isObject, isArray } from 'lodash/fp';
export function listRecordRemoveUpdater({ parentId, itemId, parentFieldName, store }) {
const parentProxy = store.get(parentId);
const items = parentProxy.getLinkedRecords(parentFieldName);
parentProxy.setLinkedRecords(items.filter(record => record._dataID !== itemId), parentFieldName);
}
@cbandy
cbandy / .gcloudignore
Last active November 13, 2023 10:17
Ignore everything except allowed files in .gcloudignore
# Ignore everything
/[!.]*
/.?*
# Except the Cloud Function files we want to deploy
!/package.json
!/index.js
!/lib/**
#!include:.gitignore
@IanColdwater
IanColdwater / twittermute.txt
Last active October 25, 2025 19:14
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@AndrewIngram
AndrewIngram / pagination.py
Last active April 13, 2021 10:35
Proper cursors with Graphene + Django. Graphene-Django's stock connections use limit/offset logic under the hood, making the whole cursor-based connection modelling kinda pointless.
import datetime
import operator
from base64 import b64decode as _unbase64
from base64 import b64encode as _base64
from functools import reduce
from django.db.models import Q
from graphene import relay
from graphql_relay.connection import connectiontypes