apache-2.0 bsd-2-clause bsd-3-clause cc-by-4.0 cc-by-nc-4.0 cc-by-nc-nd-4.0 cc-by-nc-sa-4.0 cc-by-nd-4.0 cc-by-sa-4.0 cddl-1.0
// We can import code dynamically, top level await is supported. | |
const {default: Confetti} = await import('https://cdn.skypack.dev/canvas-confetti'); | |
function fireConfetti(event) { | |
const x = event.clientX / document.body.clientWidth; | |
const y = event.clientY / document.body.clientHeight; | |
Confetti({origin: {x, y}}); | |
} | |
// lit templating is built-in |
A simple viewer for sharing code examples hosted on GitHub Gist. For example, if your Gist URL is:
https://gist.github.com/mbostock/1353700
Replace “gist.github.com” with “bl.ocks.org” in the URL to view it:
https://bl.ocks.org/mbostock/1353700
The main source for your example is in index.html. This file can contain relative links to other files in your Gist, such as images, scripts or stylesheets. And of course you can use absolute links, such as CDN-hosted D3, jQuery or Leaflet. To explain your example, add a README.md written in Markdown. (You can omit the index.html if you just want to write, too.)
git clone [email protected]:tachyons-css/tachyons.git
cd tachyons
rm -rf .git && git init
npm install && npm start
const STATUS_CODES = { | |
100: 'Continue', // RFC 7231 6.2.1 | |
101: 'Switching Protocols', // RFC 7231 6.2.2 | |
102: 'Processing', // RFC 2518 10.1 (obsoleted by RFC 4918) | |
103: 'Early Hints', // RFC 8297 2 | |
200: 'OK', // RFC 7231 6.3.1 | |
201: 'Created', // RFC 7231 6.3.2 | |
202: 'Accepted', // RFC 7231 6.3.3 | |
203: 'Non-Authoritative Information', // RFC 7231 6.3.4 |
https://github.com/electron/electron-packager#related
Electron Forge - creates, builds, and distributes modern Electron applications electron-packager-interactive - an interactive CLI for electron-packager grunt-electron - grunt plugin for electron-packager Distributable Creators electron-installer-zip - creates symlink-compatible ZIP files Windows:
var net = require('net') | |
var sock = net.connect(1337) | |
process.stdin.pipe(sock) | |
sock.pipe(process.stdout) | |
sock.on('connect', function () { | |
process.stdin.resume(); | |
process.stdin.setRawMode(true) |
license: gpl-3.0 | |
redirect: https://observablehq.com/@mbostock/epicyclic-gearing |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>BrowserWindow</title> | |
</head> | |
<body> | |
<h1>Hello from your BrowserWindow!</h1> | |
<button id="close-btn">Close this window</button> | |
<script> | |
const button = document.querySelector('#close-btn') |
// Add icons and context menus to the system's notification area. | |
// | |
// For more info, see: | |
// https://electronjs.org/docs/api/tray | |
const { app, Tray, Menu, nativeImage } = require('electron') | |
let tray | |
app.whenReady().then(() => { |