Skip to content

Instantly share code, notes, and snippets.

@rayfranco
rayfranco / README.md
Last active June 1, 2021 07:49
Inline SVG with Nuxt

Inline SVG with Nuxt

I was looking for a SSR and scoped styles ready solution to implement inline SVG with Nuxt

You need svg-inline-loader and xmldom to be installed.

@mheffner
mheffner / fly.toml
Last active September 24, 2023 14:50
Running a Mastodon server on Fly.io (plus some stuff)
app = "mastiff"
primary_region = "iad"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[build]
image = "tootsuite/mastodon:v3.5.5"
export const chaosTestStrings = (): void => {
const textNodes = getAllTextNodes(document.body);
for (const node of textNodes) {
const textNodeLength = node.textContent ? node.textContent.length : 0;
if (node.textContent === null) {
return;
}
if (node.parentElement instanceof Element) {
if (node.parentElement.dataset.originalText === undefined) {
@beerose
beerose / malleable-approaches.md
Last active August 13, 2023 13:21
Malleable software approaches
Solution Pros Cons
Plugins - Allow extending apps with various functionalities
- Widely adopted in many modern software ecosystems, enhancing versatility
- Allows forming community that creates and maintains plugins
- Non-programmers can use existing plugins that someone else created
- Only allows for a limited form of malleability; plugins are more of an outer layer of customization
- Usually can't modify core functionalities or deeply ingrained software behaviors
- A plugin created for one platform usually can't be used on another, leading to platform lock-in
- Can result in fragmented development, with popular features being redundantly developed for different environments
Black-box Interface Extensions - Allow for the modification of legacy software which doesn't have built-in plugin architectures- Can modify app interfaces without needing access to internal structure or source code, enabling adaptability
/**
* Taken from https://github.com/scrollback/juri
*
* Use of other URL-safe characters
*
* . Dot in strings
* _ Spaces in strings
*
* - Value: Start of negative number
* In numbers, negative exponent