Skip to content

Instantly share code, notes, and snippets.


crapthings crapthings

View GitHub Profile
phortuin /
Last active Aug 9, 2022
Set up postgres + database on MacOS (M1)

Based on this blogpost.

Install with Homebrew:

$ brew install postgresql

Run server:


Pure ESM package

The package linked to from here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
anatoly-scherbakov / data.gql
Created Mar 30, 2020
Star Wars expressed in
View data.gql
$jedi isa order, has name "Jedi";
$sith isa order, has name "Sith";
# Okay, let's start with some Jedi masters we know of.
$obi-wan isa human, has name "Obi-Wan Kenobi", has gender "male";
$obi-wan-is-jedi (member: $obi-wan, member-of: $jedi) isa membership;
# What do we know about Anakin?
harveyconnor /
Last active Jul 29, 2022
MongoDB Replica Set / docker-compose / mongoose transaction with persistent volume

This will guide you through setting up a replica set in a docker environment using.

  • Docker Compose
  • MongoDB Replica Sets
  • Mongoose
  • Mongoose Transactions

Thanks to for helping with their docker-compose file!

Lepozepo / Dockerfile
Created Jan 3, 2019
Not so automatic meteor now deployment
View Dockerfile
FROM node:8.9.4
LABEL name="hermes"
COPY . /usr/src/app/
WORKDIR /usr/src/app
RUN cat *sf-part* > bundle.tar.gz
RUN tar -xzf bundle.tar.gz
WORKDIR bundle/programs/server
RUN npm install
Rich-Harris /
Last active Aug 6, 2022
The truth about Svelte

I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.

But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.

Svelte is a language.

Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?

A few projects that have answered this question:

xujiaao /
Last active Jun 8, 2020
[INSTALL_FAILED_DEXOPT] Error on Android 5.1

[INSTALL_FAILED_DEXOPT] Error on Android 5.1

View kadira-stack.yml
version: '3'
condition: on-failure
- mongo
image: vladgolubev/kadira-engine
gwpantazes / How to Install JDK MacOS
Last active Aug 7, 2022
How to install different JDK versions on MacOS with Homebrew
View How to Install JDK MacOS

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

agrcrobles /
Last active Jul 9, 2022 — forked from patrickhammond/
Setup Android SDK on OSX with and without the android studio

Hi, I am a fork from

A high level overview for what I need to do to get most of an Android environment setup and maintained on OSX higher Catalina and Big Sur with and without Android Studio been installed.

Considering the SDK is installed under /Users/<your_user>/Library/Android/sdk folder which is the Android Studio preferred SDK location, but it works fine under /usr/local/share/android-sdk as well, which is a location pretty much used on CI mostly.

Prerequisites: instead ?