Skip to content

Instantly share code, notes, and snippets.

@wonderstory
wonderstory / salt_sample.md
Last active February 12, 2026 20:19
PlantUML Salt (GUI Wireframe) cheat sheet

PlantUML Salt (GUI Wireframe) cheat sheet

generated image

image

@sindresorhus
sindresorhus / esm-package.md
Last active March 22, 2026 08:39
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.
@crypticmind
crypticmind / README.md
Last active August 23, 2025 10:36
Setup lambda + API Gateway using localstack
@shaiguitar
shaiguitar / gist:627d52ebc0c03af488477b5d636a8909
Created August 31, 2017 22:27
Using docker compose to mount current working directory dynamically into the container
# mount volume PWD on host to /app in container.
shai@lappy ~/tmp/example-working-docker-compose-environment-vars [master *] ± % cat docker-compose.yml
version: "3"
services:
some_server:
...
volumes:
- $PWD:/app
@SKempin
SKempin / Git Subtree basics.md
Last active March 8, 2026 20:56
Git Subtree basics

Git Subtree Basics

If you hate git submodule, then you may want to give git subtree a try.

Background

When you want to use a subtree, you add the subtree to an existing repository where the subtree is a reference to another repository url and branch/tag. This add command adds all the code and files into the main repository locally; it's not just a reference to a remote repo.

When you stage and commit files for the main repo, it will add all of the remote files in the same operation. The subtree checkout will pull all the files in one pass, so there is no need to try and connect to another repo to get the portion of subtree files, because they were already included in the main repo.

Adding a subtree

Let's say you already have a git repository with at least one commit. You can add another repository into this respository like this:

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@ecridge
ecridge / link-icloud-drive.sh
Created October 2, 2016 17:47
Add a symbolic link to iCloud Drive in Bash on macOS.
@DBLaw
DBLaw / datadog-digest-v5.py
Created July 7, 2016 17:32
Pull data from the ThousandEyes API and push to Datadog
#!/usr/bin/python
apiVersion = 'v5'
apiURL = 'https://api.thousandeyes.com'
urlBase = apiURL + '/' + apiVersion + '/'
logLevel = 3
requestCount = 0
uploadLimit = 10000
@chrisveness
chrisveness / utf8-regex.js
Last active May 25, 2023 01:53
Utf8 string encode/decode using regular expressions
/**
* Encodes multi-byte Unicode string into utf-8 multiple single-byte characters
* (BMP / basic multilingual plane only).
*
* Chars in range U+0080 - U+07FF are encoded in 2 chars, U+0800 - U+FFFF in 3 chars.
*
* Can be achieved in JavaScript by unescape(encodeURIComponent(str)),
* but this approach may be useful in other languages.
*
* @param {string} unicodeString - Unicode string to be encoded as UTF-8.
@7mp
7mp / lauantaileikit.txt
Last active May 16, 2024 14:59
Lauantaileikit
"Ciribim ciribom"
Ciribim ciribom
älä luule että uskotaan
Ciribim ciribom
sua enää ollenkaan
Tytön täytyy ymmärtää
se milloin häntä narrataan