Skip to content

Instantly share code, notes, and snippets.


iam4x iam4x

View GitHub Profile
yorickdowne /
Last active Sep 19, 2022
Pruning Geth 1.10.x


Geth (Go-Ethereum) as of July 2022 takes about 650 GiB of space on a fast/snap sync, and then grows by ~ 14 GiB/week with default cache, ~ 8 GiB/week with more cache.

This will fill a 1TB SSD in a few months, to the point where space usage should be brought down again with an offline prune.

There is an odd behavior with Geth 1.10.20 where initial DB size is large after sync until Geth has been restarted twice. This is expected to be fixed soon, possibly as soon as 1.10.21.

Happily, Geth 1.10.x introduces "snapshot offline prune", which brings it back down to about its original size. It takes roughly 4-6 hours to prune the Geth database, and this has to be done while Geth is not running.

Caveat that while several folx have used offline pruning successfully, there is risk associated with it. The two failure mode


Fixing macOS 10.14, 10.15, 12

Dark main menu without the rest of dark mode

  1. Set Light mode
  2. defaults write -g NSRequiresAquaSystemAppearance -bool Yes
  3. Log out and log back in
  4. Set Dark mode
trevorgreenleaf / px-rem-tw.csv
Last active Jul 11, 2022
View px-rem-tw.csv
4 0.25 1
8 0.5 2
16 1 4
32 2 8
48 3 12
64 4 16
80 5 20
96 6 24
112 7 28
GiampaoloFalqui / selectHierarchicalMenu.js
Last active Mar 17, 2021
Hierarchical Tree Menu with Select Box (instantsearch)
View selectHierarchicalMenu.js
var customMenuRenderFn = function (renderParams, isFirstRendering) {
var container = renderParams.widgetParams.container;
var title = renderParams.widgetParams.title;
var templates = renderParams.widgetParams.templates;
var cssClasses = renderParams.widgetParams.cssClasses || "";
var attributes = (attribute) {
return attribute.replace('.', '___');
var currentSelectedValue = null;
threepointone /
Last active Sep 4, 2022
why css purists will love glam

I made a little styling lib called glam

(some features are in development)


let's start off with the simplest use case. we'll make an 'index.html' page, and assume we've setup our js bundler to output bundle.js

dtran320 / circle.yml
Last active Oct 13, 2016
Yarn on CircleCI
View circle.yml
- curl -o- -L | bash
- yarn
post: # At least for me, it doesn't seem like `scripts` in `package.json` are being run, so you need to add them explicitly
- yarn run postinstall
Rich-Harris /
Last active Sep 12, 2022
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

mweststrate / mobx.js
Created Jun 15, 2016
Local component state with MobX
View mobx.js
import {observable} from "mobx"
import {observer} from "mobx-react"
@observer class Select extends React.Component {
@observable selection = null; /* MobX managed instance state */
constructor(props, context) {
super(props, context)
this.selection = props.values[0]
rauchg /
Last active Sep 1, 2022