Skip to content

Instantly share code, notes, and snippets.

khalidx /
Last active December 6, 2023 18:30
A Node + TypeScript + ts-node + ESM experience that works.

The experience of using Node.JS with TypeScript, ts-node, and ESM is horrible.

There are countless guides of how to integrate them, but none of them seem to work.

Here's what worked for me.

Just add the following files and run npm run dev. You'll be good to go!


kconner / macOS
Last active December 1, 2023 16:48
macOS Internals
View macOS

macOS Internals

Understand your Mac and iPhone more deeply by tracing the evolution of Mac OS X from prelease to Swift. John Siracusa delivers the details.

Starting Points

How to use this gist

You've got two main options:

rain-1 /
Last active December 6, 2023 05:52
LLM Introduction: Learn Language Models


Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.


Neural network links before starting with transformers.

View twitterFollowerCuratorBot.php
// File: twitterFollowerCuratorBot.php
// Created: May 2021
// License: MIT
sindresorhus /
Last active December 6, 2023 13:39
Pure ESM package

Pure ESM package

The package that linked you 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.
cocowalla / Dockerfile
Last active November 7, 2022 15:38
TimescaleDB on debian stretch-slim
View Dockerfile
# Docker image for PostgreSQL with the TimescaleDB extensions installed, running on a Debian Stretch-Slim base
# Begin by building TimescaleDB
FROM postgres:11.2 AS build
ENV TIMESCALEDB_SHASUM="c8e8071c24707e3fa8a50abb788c85d03a1bd9d9dea2e273b4abf407f39c182a timescaledb-${TIMESCALEDB_VERSION}.tar.gz"
RUN buildDeps="curl build-essential ca-certificates git python gnupg libc++-dev libc++abi-dev pkg-config glib2.0 cmake libssl-dev" \
&& apt-get update \
jay3sh /
Created March 30, 2016 16:46
Guard My Macbook When I'm Away
# When you are working on your macbook sitting in cafe and you have to go pee,
# you need some way to guard you machine.
# Start this script, remove any earphones, and go do the job.
# The assumption is the thief will close the lid of the laptop before taking it away.
# This script detects the closing of the lid and plays some loud audio that will
# likely distract the thief and/or grab attention of nearby people, making the
LeCoupa / nodejs-cheatsheet.js
Last active November 27, 2023 09:53
Complete Node.js CheatSheet --> UPDATED VERSION -->
View nodejs-cheatsheet.js
/* *******************************************************************************************
* ******************************************************************************************* */
// 0. Synopsis.
harith /
Last active September 18, 2022 07:50
Utilities to let you easily reach frequently visited but deeply nested directories.
# Utilities for quickly accessing frequently used directories in bash.
# Usage:
# $ cd /path/to/project/src/
# $ mark code # Will create a new shortcut.
# # Becomes interactive if a shortcut already exists
# # m is an alias for mark. You can also `m code`
# $ code # From now on, running this anywhere in the shell
# # will put you in /path/to/project/src/code
nikcub /
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007