Skip to content

Instantly share code, notes, and snippets.

@waynebloss
waynebloss / README.md
Last active November 29, 2022 22:53
Systemd Socket Activation for PWA

Systemd Socket Activation for PWA

How to create a PWA with a local server that starts on demand using systemd on Linux.

The steps below are very rough and would need to be automated during app installation. These notes are geared for Arch/Manjaro Linux. Your path to systemd-socket-proxyd might be different.

_(Something similar can be done with macOS' launchd service. Windows has nothing for this except for some really complicated .NET-centric services that

@waynebloss
waynebloss / styled.ts
Last active August 6, 2022 19:34
JS tagged template styling functions for console.log
/**
* @file Styling functions for `console.log`.
* Usage: See testing area at bottom of file.
* References:
* - https://developer.mozilla.org/en-US/docs/Web/API/console#styling_console_output
*/
const defaultStyles: Record<string, string> = {
// #region Colors
black: "color: black",
@waynebloss
waynebloss / README.md
Last active February 3, 2022 15:22
Testing yarn alias with Deep Dependencies

Testing yarn alias with Deep Dependencies

Yarn tip: You can alias a package by using yarn add fake-name@npm:left-pad. Now you can use require("fake-name") to require left-pad.

This could be useful for module level dependency injection or inversion of control...

@waynebloss
waynebloss / markdown-compatible-gitignore.md
Last active December 31, 2015 16:39
Markdown Compatible gitignore

Markdown Compatible gitignore

The file below is in a format that is valid for both gitignore and markdown.

Could be useful! (And should be easy enough to maintain.)