Skip to content

Instantly share code, notes, and snippets.

View yyyanghj's full-sized avatar
👋
Hi!

yyyanghj yyyanghj

👋
Hi!
View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active October 21, 2025 13:33
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.
var noop = () => {}
var compose = (f1, f2) => (...args) => f1(f2(...args))
var range = (start, end) => {
let n = start
let f = (next, complete) => {
if (n <= end) {
next(n++)
f(next, complete)
} else {
complete()
@bradp
bradp / setup.sh
Last active August 21, 2025 15:06
New Mac Setup Script
echo "Creating an SSH key for you..."
ssh-keygen -t rsa
echo "Please add this public key to Github \n"
echo "https://github.com/account/ssh \n"
read -p "Press [Enter] key after this..."
echo "Installing xcode-stuff"
xcode-select --install
@steve-jansen
steve-jansen / README.md
Last active December 13, 2024 23:29
Stop and start Symantec Endpoint Protection on OS X

This script enables you stop and start Symantec Endpoint Protection on OS X

Installation

sudo curl https://gist.githubusercontent.com/steve-jansen/61a189b6ab961a517f68/raw/sep -o /usr/local/bin/sep
sudo chmod 755 /usr/local/bin/sep
sudo chown root:staff /usr/local/bin/sep
@staltz
staltz / introrx.md
Last active October 26, 2025 03:06
The introduction to Reactive Programming you've been missing