Skip to content

Instantly share code, notes, and snippets.

@waynebloss
waynebloss / README.md
Last active Nov 29, 2022
Systemd Socket Activation for PWA
View README.md

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 Aug 6, 2022
JS tagged template styling functions for console.log
View styled.ts
/**
* @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 / Dotnet-core-manjaro-linux.md
Last active Jul 17, 2022
Setup .NET Core on Manjaro Linux
View Dotnet-core-manjaro-linux.md

Manjaro DOTNET setup

  1. Install dotnet-sdk with the package manager.

  2. Create a file /etc/profile.d/dotnet.sh with contents:

export DOTNET_ROOT=/opt/dotnet
export MSBuildSDKsPath=$DOTNET_ROOT/sdk/$(${DOTNET_ROOT}/dotnet --version)/Sdks
export PATH=${PATH}:${DOTNET_ROOT}
@waynebloss
waynebloss / README.md
Last active Feb 3, 2022
Testing yarn alias with Deep Dependencies
View README.md

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...

View ExtendThisDictionaryPlayground.swift
import Foundation
protocol ComponentObject {
var name: String { get }
}
private var _idPrev = 0;
private func defaultName(baseName: String) -> String {
return baseName + String(++_idPrev)
}
@waynebloss
waynebloss / markdown-compatible-gitignore.md
Last active Dec 31, 2015
Markdown Compatible gitignore
View markdown-compatible-gitignore.md

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.)