Skip to content

Instantly share code, notes, and snippets.

View mojoaxel's full-sized avatar
🏠
Working from home

Alexander Wunschik mojoaxel

🏠
Working from home
View GitHub Profile
@LilithWittmann
LilithWittmann / autobahn.md
Last active October 26, 2023 12:11
autobahn.md
@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.
@SirPepe
SirPepe / draft.txt
Created February 19, 2021 11:39
Grundgesetz für Web Components
Grundgesetz für Web Components
------------------------------
§ 1 Web Components sind HTML-Elemente und müssen sich wie HTML-Elemente verhalten. Sie sind kein 1:1-Ersatz für andere Komponenten-Konzepte, sondern universelle, einfach zu benutzende Erweiterungen des HTML-Vokabulars. Ihre Attribute und APIs müssen so konzipiert sein, das sie HTML-Autoren nicht überraschen. Das stellt sicher, dass Web Components universelle Plugins sind, die in jedem Browser und Framework gut funktionieren. Insbesonders zu beachten ist:
§ 1.1 Web Components müssen einen nützlichen Use Case anbieten, der allein mit HTML-Mitteln umgesetzt werden kann. JavaScript-APIs können den Funktionionsumfang einer Web Component beliebig erweitern, dürfen aber nicht zur Pflicht werden (vgl. <video>). Das stellt sicher, dass jeder Mensch, der ein bisschen HTML kann, Web Components nutzen kann.
§ 1.2 Web Components müssen Fail-Safe sein. Sie dürfen keine JavaScript-Exceptions werfen sondern müssen wie native HTML-Elemente mit jeder Art von
@planetceres
planetceres / RESET_USB_KERNEL_MODULE.md
Last active November 6, 2024 20:44
Restart/reset USB kernel module in Ubuntu 18.04 without rebooting
@palimphread
palimphread / soup.io.sh
Last active July 11, 2020 21:15 — forked from fadenb/soup.io.sh
Script for downloading all images posted on a soup (soup.io)
#!/usr/bin/env bash
# Author: Mike Herwig
# Description: Script for downloading all images posted on a soup (soup.io)
#where to download from
HOST="suckup.soup.io"
#this is the regex for matching the images, you might want to update it when soup.io changes their urls
# 2017-02-14: Updated regex to catch new and old URLs
@rmela
rmela / SQL query results as nodejs read stream
Last active September 18, 2024 06:10
SQLite query results as nodejs readable stream
/*
*
* Return SQLite3 query results as a Nodejs stream, sensitive to backpressure.
*
* Assumes a foo.db file with a lot of rows - I used 1000 with a number & a string
*/
const stream = require('stream');
const sqlite = require('sqlite3');
class DBStream extends stream.Readable {

Screen Quick Reference

Basic

Description Command
Start a new session with session name screen -S <session_name>
List running sessions / screens screen -ls
Attach to a running session screen -x
Attach to a running session with name screen -r <session_name>
@bretton
bretton / lightning-maps.md
Last active June 4, 2024 12:36
Visualisers of the Lightning Network (and some other explorers)

A (mostly) visual collection of the Lightning Network

Disclaimer

Network views tend to be the view of the network from a single node, or small selection of nodes. They are not complete views of the network. This is impossible to achieve. Even if many node views were combined, it would still be incomplete.

These network views, or network maps, have been termed 'visualisers' by the LN community.

Screenshots may reflect older visual styles, and are dated accordingly.

@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 15, 2024 23:29
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@mbhall88
mbhall88 / .gitignore
Last active October 25, 2022 19:46
A dynamic, reusable donut chart for D3.js v4
.DS_Store
.idea