Skip to content

Instantly share code, notes, and snippets.

@corbane
corbane / monaco-readonly-range.js
Last active December 26, 2021 07:07
A proof of concept to define a read-only range in the Monaco editor
//@ts-check
//#region dom.js
/** @typedef {boolean|number|bigint|string} Scalar */
/** @param {string} content */
function appendStyleSheet (content)
{
const style = document.createElement ("style")
@sindresorhus
sindresorhus / esm-package.md
Last active May 5, 2024 20:24
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.
@jhillyerd
jhillyerd / libvirtd-ops.md
Last active August 29, 2023 03:15
Getting started with nixops and libvirtd

Enable libvirtd

Add:

virtualisation.libvirtd.enable = true;

and

users.users.<you>.extraGroups = [ "libvirtd" ];
@clarkdave
clarkdave / createPages.ts
Created April 15, 2018 13:11
TypeScript + Gatsby node API
import { resolve } from 'path'
import { GatsbyCreatePages } from './types'
const createPages: GatsbyCreatePages = async ({
graphql,
boundActionCreators,
}) => {
const { createPage } = boundActionCreators
const allMarkdown = await graphql(`

channel operator quick reference

direct discussion about administrative action away from the main channel and into #reddit-diabetes-ops to minimise disruption. our -ops channel is the place where users should come to ask for our help. examples:

  • any sort of operator request or discussion of channel administration in the main channel
  • PMs asking why a ban was set
  • reports of harassment (unless the user is confiding in you)
  • any request for operator action

changing channel access permissions

@pascalpoitras
pascalpoitras / config.md
Last active April 28, 2024 23:12
My WeeChat configuration

WeeChat Screenshot

Mouse


enable