Skip to content

Instantly share code, notes, and snippets.

View clementherve's full-sized avatar

Clément H. clementherve

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active November 15, 2024 15:20
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.
@ignis-sec
ignis-sec / ignis-top-100-most-common.txt
Created June 21, 2020 08:19
Top 100 most common passwords from old public db leaks.
Password | Occurrence
_____________|____________
123456 |5377325
123456789 |1962160
password |1190534
qwerty |869629
12345678 |703220
12345 |679886
123123 |460430
1234 |448199
@justincbagley
justincbagley / How_to_Convert_Markdown_to_PDF.md
Last active November 14, 2024 03:43
How To Convert Markdown to PDF

How to convert markdown to PDF:

This post reviews several methods for converting a Markdown (.md) formatted file to PDF, from UNIX or Linux machines.

Using Pandoc:

$ pandoc How_I_got_svg-resizer_working_on_Mac_OSX.md -s -o test1.pdf
@vratiu
vratiu / .bash_aliases
Last active November 16, 2024 06:21
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@miyukino
miyukino / MergeSort.scm
Created May 26, 2013 08:41
Scheme: Merge Sort
;; Exp. (merge '(1 3 5 7 8 9 10) '(2 4 6)) ==> (1 2 3 4 5 6 7 8 9 10)
(define (merge L M)
(if (null? L) M
(if (null? M) L
(if (< (car L) (car M))
(cons (car L) (merge (cdr L) M))
(cons (car M) (merge (cdr M) L))))))
;; split helper functions
(define (odd L)