Skip to content

Instantly share code, notes, and snippets.

View brettbatie's full-sized avatar

Brett Batie brettbatie

View GitHub Profile
@sindresorhus
sindresorhus / esm-package.md
Last active May 8, 2025 09:12
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.
@rohankhudedev
rohankhudedev / opcache.ini
Last active March 14, 2025 06:20
Best Zend OpCache Settings / Tuning / Configurations
[opcache]
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
;opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=512
@amr
amr / my.ini
Last active September 30, 2020 17:46
MySQL my.cnf settings optimized for local development, this is NOT a complete my.cnf configuration, the settings here are meant to be copied from their sections and pasted in the appropriate section in an existing working my.cnf
[mysqld]
open-files-limit = 24000
character-set-server = utf8
character-set-filesystem = utf8
#
# InnoDB
#
# After applying these for the first time on a new mysql installation with no