Skip to content

Instantly share code, notes, and snippets.

View uncenter's full-sized avatar
🌸
:3

uncenter uncenter

🌸
:3
View GitHub Profile
@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 February 20, 2024 02:31
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