Skip to content

Instantly share code, notes, and snippets.

View uncenter's full-sized avatar
🌸

uncenter uncenter

🌸
View GitHub Profile
@uncenter
uncenter / logs.txt
Created November 4, 2024 12:56
Vlt error logs.
$ vlt run dev
[11ty] Eleventy Error (CLI):
[11ty] Invalid module ".../node_modules/.vlt/%C2%B7%C2%B7@11ty%[email protected]/node_modules/@11ty/eleventy/src/defaultConfig.js" must not include encoded "/" or "\" characters imported from .../node_modules/.vlt/··@11ty%[email protected]/node_modules/@11ty/eleventy/src/Util/Require.js (via TypeError)
@uncenter
uncenter / twitter-potential-bots.css
Last active September 15, 2024 00:28
Mark potentially botted followers in your Twitter followers list. Highlights users with the default profile picture (marked in red) and/or no description (can have some false positives, marked in orange).
/* ==UserStyle==
@name Twitter Potential Bots
@namespace uncenter/twitter-potential-bots
@version 1.0
@author uncenter
@description Mark potentially botted followers in your followers list.
==/UserStyle== */
@-moz-document regexp("https:\/\/x\.com\/\w+\/followers") {
[role="menuitem"][data-testid="removeFollower"] {
@uncenter
uncenter / macos-app-icon-template.md
Last active April 20, 2024 02:11
SVG template for creating macOS app icons.

macOS App Icon Template

Pretty simple to use - download the attached template.svg file, bring in your logo or icon, resize it to the dimensions of the red square (and delete the red square).

@uncenter
uncenter / siliconify.sh
Last active April 9, 2024 14:08
Take screenshots of files with specified extensions with https://github.com/Aloxaf/silicon.
#!/usr/bin/env bash
# You can run the following command to execute this script:
# curl https://gist.githubusercontent.com/uncenter/0580584e5238fb0306a4b7f53aa9f508/raw/01a0b3b07cfdcc11931590d4652d24089f656f2f/siliconify.sh | sh
# Requires https://github.com/charmbracelet/gum, https://github.com/Aloxaf/silicon, and https://github.com/sharkdp/fd to be installed locally.
extensions=$(fd -tf | awk -F. '!a[$NF]++{print $NF}')
files=()
@uncenter
uncenter / archived-this-repo-notice.md
Last active May 31, 2024 01:59
Notices to place at the top of READMEs before archiving a repository.

Repository replaced / suggest alternative:

<div align="center">
	<h1>🚧 ARCHIVED 🚧</h1>
	<h3>Use <a href="https://xyz.com">xyz</a> instead.</h3>
</div>

---
@uncenter
uncenter / arc-credits.js
Last active September 24, 2023 02:23
Find your (or any) name in the Arc Browser's Credits (https://arc.net/credits).
const name = prompt("Enter the name to search for:");
const credits = document.querySelector('.c-bMkhAk');
if (credits) {
const elements = credits.childNodes;
let count = 0;
let target= null;
for (let i = 0; i < elements.length; i++) {
@uncenter
uncenter / markdown-it-container-dynamic.js
Last active December 5, 2023 16:01
Use any class for markdown-it-container instead of just a single one.
const markdownItContainer = require('markdown-it-container');
const markdownIt = require('markdown-it');
const md = new markdownIt().use(markdownItContainer, 'dynamic', {
validate: function () {
return true;
},
render: function (tokens, idx) {
const token = tokens[idx];
return token.nesting === 1

This is just a note to my future self - no assurances it will work for you!

This fix isn't permanent and will be overwritten by the system arbitrarily, hence why I wrote down the steps and script that worked for me here so I can easily set it again. The previous sentence was true until macOS Sonoma (14) was released, which now allows TouchID for sudo to persist across updates and restarts. The script will automatically detect if you are on Sonoma or later and apply that permanent change instead of the earlier, non-permanent fix.

Usage

Copy + run the line below.

curl -fsSL https://gist.githubusercontent.com/uncenter/604233698c41f1c54079760b93fbabf0/raw/x.sh | sh
if
endif
for
endfor
asyncEach
endeach
asyncAll
endall
macro
endmacro