Skip to content

Instantly share code, notes, and snippets.


Josh Santangelo endquote

View GitHub Profile

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.
vadimdemedes / app.js
Last active Jul 10, 2020
Starter code for creating a custom React renderer
View app.js
import React from 'react';
import reconciler from './reconciler';
const App = () => {
return <h1>Hello World</h1>;
const render = (tree, target) => {
const container = reconciler.createContainer(target);
container.updateContainer(tree, container);
JonnyWong16 /
Last active Jan 13, 2022
Sync Plex playlists to shared users.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description: Sync Plex playlists to shared users.
# Author: /u/SwiftPanda16
# Requires: plexapi, requests, xmltodict
import requests
import xmltodict
View nodejs setup on Dreamhost VPS
1) Make a download dir to store the node source and download it.
mkdir downloads
cd downloads
git clone
Find the latest version
2) List all of the tags in the repository, and check out the most recent.
git tag
git checkout v0.9.9
endquote / instagram.js
Last active Dec 11, 2015
Keyboard navigation for Instagram timeline
View instagram.js
A userscript to add keyboard shortcuts to the Instagram timeline:
- J or space to go to next image
- K to go to previous image
- L to toggle like on the current image
- N to load new posts
$(document.body).keypress(function(event) {
// ignore keypresses in comment fields
will3942 / app.rb
Last active Sep 15, 2021
Reverse-Engineering Instagram
View app.rb
require 'openssl'
require 'base64'
require 'json'
require 'httpclient'
http = => useragent)
key = "" #The Private key
login_info = {:guid => "00000000-0000-0000-0000-000000000000",
:password => "PASSWORD",
:username => "USERNAME",
brandonb927 /
Last active Jan 10, 2022
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see
# Alot of these configs have been taken from the various places
# on the web, most from here
jamiew / google_twunter_lol
Created Jul 28, 2011
All the dirty words from Google's "what do you love" project:
View google_twunter_lol