Skip to content

Instantly share code, notes, and snippets.

@joepie91
joepie91 / es-modules-are-terrible-actually.md
Last active May 9, 2025 15:29
ES Modules are terrible, actually

ES Modules are terrible, actually

This post was adapted from an earlier Twitter thread.

It's incredible how many collective developer hours have been wasted on pushing through the turd that is ES Modules (often mistakenly called "ES6 Modules"). Causing a big ecosystem divide and massive tooling support issues, for... well, no reason, really. There are no actual advantages to it. At all.

It looks shiny and new and some libraries use it in their documentation without any explanation, so people assume that it's the new thing that must be used. And then I end up having to explain to them why, unlike CommonJS, it doesn't actually work everywhere yet, and may never do so. For example, you can't import ESM modules from a CommonJS file! (Update: I've released a module that works around this issue.)

And then there's Rollup, which apparently requires ESM to be u

@WetHat
WetHat / PY-BoxTree.ipynb
Last active November 6, 2024 16:35
A Partially Balanced Bounding Box Tree Implementation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
systemctl daemon-reload
systemctl stop frps.service || true
touch /lib/systemd/system/frps.service
ENVPGM=/usr/bin/nohup
FRPS=/root/go/bin/frps
FRPS_CONF=/root/go/init.d/frps.ini
FRPS_LOG=/var/log/frps.log
@athurg
athurg / sc_state_grid.go
Created September 28, 2016 11:38
国网四川省电力公司电费查询工具
/*
掌上川电客户端
@description 可以查询用户信息近期用电详情
使用方式:
1. 先以`-listen port`参数启动本程序,建立一个HTTP代理服务器
2. 设置手机使用这个代理服务器,并打开“掌上川电”客户端进行登陆
3. 登陆成功后,本代理服务器会自动检测到会话编号并输出,此时可以关闭手机代理的设置
4. 以`-sid 会话编号`为参数启动本程序,即可查询
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""