Skip to content

Instantly share code, notes, and snippets.

@lmammino
lmammino / promise-with-resolvers-polyfill.js
Created July 18, 2023 17:57
Promise.withResolvers() polyfill
if (typeof Promise.withResolvers === 'undefined') {
Promise.withResolvers = function () {
let resolve, reject
const promise = new Promise((res, rej) => {
resolve = res
reject = rej
})
return { promise, resolve, reject }
}
}
@sinwoobang
sinwoobang / curl-h3.sh
Last active December 17, 2024 06:27
Install curl supporting HTTP/3 on Apple Silicon
# Referred to https://dev.to/gjrdiesel/installing-curl-with-http3-on-macos-2di2
# Clean up any old version of curl you may have already tried to install
brew remove -f curl
# Download the curl ruby install script provided by cloudflare
curl -O https://gist.githubusercontent.com/sinwoobang/bfc7cc8d4d38157bde064fc2ccb60c64/raw/bf55b7c6af9ed06d2cd909ea167a69948a800e7d/curl.rb
# Install curl via that script from the latest git repos
brew install --HEAD -s curl.rb
@peytondmurray
peytondmurray / firefox_tweaks.md
Last active August 11, 2024 08:55
Firefox tweaks

Disable microphone and camera mini popup window

Set the following variables in about:config

privacy.webrtc.hideGlobalIndicator = true
privacy.webrtc.legacyGlobalIndicator = false

Remove horizontal tabs at the top of Firefox

@enihsyou
enihsyou / 获取移动光猫H2-2管理员密码.md
Last active February 15, 2025 16:07
获取移动光猫 H2-2 管理员密码 ver.2022-04

长话短说,直接列出操作方法。求解过程用到的阅读链接放在最后

适用型号

设备名称:吉比特无源光纤接入用户端设备(GPON ONU)
设备类型:中国移动智能家庭网关 类型二
设备型号:H2-2
生产日期:2021/03

[!IMPORTANT]

@sxzz
sxzz / hi.md
Last active February 27, 2025 07:05
自我介绍

自我介绍

👋 Hi,我是三咲智子,00 后,目前大二在读(写于 2022 年),开源爱好者,Vue、VueUse、Element Plus 开源社区团队成员。这篇文章受 Anthony Fu 的播客视频的启发,主要介绍我的编程经历。以时间线为顺序,也是自我回忆和整理下我这些年都干了些什么。部分回忆可能存在时间错误,但事情都是实际发生过的。

我的经历

我从小学就开始接触编程和其他技术相关的东西了。

2011 年 9 岁四年级

@xmlking
xmlking / curl-with-http3-macos.md
Created December 4, 2021 20:09
Installing curl with http3 on MacOS

Work-in-pogress

Ref: cloudflare/homebrew-cloudflare#21

 # Clean up any old version of curl you may have already tried to install
brew remove -f curl

# Download the curl ruby install script provided by cloudflare
@felix021
felix021 / socks5_proxy.go
Created November 21, 2020 08:12
Minimal socks5 proxy implementation in Golang
package main
import (
"encoding/binary"
"errors"
"fmt"
"io"
"net"
)
@roaldnefs
roaldnefs / mac-docker-gui.txt
Created December 22, 2019 10:27
Running GUI application in Docker on MacOS
# Install XQuartz
brew cask install xquartz
# Restart MacOS
# Open XQuartz
open -a XQuartz
# Ensure the "Allow connections from network clients" option in Preferences >> Security is turned on