Skip to content

Instantly share code, notes, and snippets.

@suntong
suntong / Comment.md
Last active June 17, 2022 07:52
Go template FuncMap example, working
@suntong
suntong / Get Ready For ESM.md
Last active June 11, 2022 02:58
Get Ready For ESM

Get Ready For ESM

Note,

The following was first published by Sindre Sorhus in Jan 13 2021 at https://blog.sindresorhus.com/get-ready-for-esm-aa53530b3f77 but have since disappeard from the Internet. Thus republishing it below --

JavaScript Modules will soon be a reality for Node.js package maintainers.

sudo apt install equivs

equivs-build <package_name>

@suntong
suntong / Go 语言圣经学习笔记.md
Last active March 22, 2022 20:51
Go 语言圣经学习笔记
/**
* Wechaty - WeChat Bot SDK for Personal Account, Powered by TypeScript, Docker, and 💖
* - https://github.com/chatie/wechaty
*/
const {
Wechaty,
ScanStatus,
log,
} = require('wechaty')
@suntong
suntong / nfpm.yaml
Last active December 9, 2021 17:15
# Name. (required)
name: foo
# Architecture. (required)
# This will expand any env var you set in the field, eg version: ${GOARCH}
# The architecture is specified using Go nomenclature (GOARCH) and translated
# to the platform specific equivalent. In order to manually set the architecture
# to a platform specific value, use deb_arch, rpm_arch and apk_arch.
arch: amd64
@suntong
suntong / nfpm.sh
Last active December 9, 2021 04:00
#!/bin/sh
set -e
# Code generated by godownloader on 2019-12-25T12:47:14Z. DO NOT EDIT.
#
usage() {
this=$1
cat <<EOF
$this: download go binaries for goreleaser/nfpm
@suntong
suntong / x
Created November 14, 2021 01:53
x
@suntong
suntong / test.md
Last active November 8, 2021 15:02

test.mdtest2