Skip to content

Instantly share code, notes, and snippets.

@waynebloss
waynebloss / DatabaseManager.ts
Created January 24, 2024 17:29
Using TSyringe without emitDecoratorMetadata (Preview)
/** @file SAMPLE code with unchanged import paths, from a VITE/REACT app. */
import { Disposable } from "@/base/types";
import { Lifecycle, delay } from "@/base/di";
import { Registry } from "@/platform/registry";
import { ILogger } from "@/platform/logger/LoggerService";
const {
acquire,
registerClass,
registerInjectable,
@waynebloss
waynebloss / Google-search-YT-stylebot.md
Last active January 25, 2023 21:35
Stop Google search from embedding YouTube results

How to stop Google search from playing embedded YouTube results

NOTE: None of this works very well. I turned it off until I can find a better way.

It's really annoying when you click a YouTube thumbnail in the Google search results now because it doesn't take you to the target site like any other search result. Nope. Now YouTube results are "special" because they want to take you on a "video voyage" to discover the thing you clicked on and they show you a stupid embedded player with crappy video quality that plays right in the Google search results page. (Only for YouTube results! That's not confusing at all!)

@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 / Dotnet-core-manjaro-linux.md
Last active July 17, 2022 10:50
Setup .NET Core on Manjaro Linux

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 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 / ExtendThisDictionaryPlayground.swift
Created March 10, 2016 19:42
How do I extend this dictionary?
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 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.)