Skip to content

Instantly share code, notes, and snippets.

View dealingwith's full-sized avatar

Daniel Miller dealingwith

View GitHub Profile
@dealingwith
dealingwith / formula.txt
Created November 13, 2024 21:46
due date proximity Notion formula
if(prop("Status") != "Done",
if(formatDate(dateEnd(dateStart(prop("Due"))), "MMM DD, YYYY") == formatDate(now(), "MMM DD, YYYY"), "Due Today ⌛",
if(dateBetween(dateEnd(prop("Due")), now(), "days") > 0, format(abs(dateBetween(dateEnd(prop("Due")), now(), "days")) + 1) + " Days ⏳",
if(dateBetween(dateEnd(prop("Due")), now(), "days") > -1, "Due Tomorrow ⏳",
if(dateBetween(dateEnd(prop("Due")), now(), "days") < 0, format(abs(dateBetween(dateEnd(dateStart(prop("Due"))), now(), "days"))) + " Days Past Due 🔥", ""))
)
),
"")
@dealingwith
dealingwith / hide-notion-ai.css
Created October 25, 2024 02:51
CSS to hide Notion AI in sidebar and bottom right corner
a[href="/chat"] {
display: none !important;
}
.notion-assistant-corner-origin-container {
display: none;
}
@dealingwith
dealingwith / arc_youtube_hide_shorts_and_upcoming.js
Last active December 16, 2022 04:14
An Arc boost to hide shorts and upcoming videos in the subscription page
addMutationObserver();
function addMutationObserver() {
const observer = new MutationObserver(function (mutations) {
mutations.forEach(function (mutation) {
mutation.target.querySelectorAll("ytd-grid-video-renderer").forEach(handleElement);
});
});
observer.observe(document.body, { subtree: true, childList: true });
}
@dealingwith
dealingwith / gum_stuff.md
Created October 7, 2022 21:38
Gum stuff

brew install gum


Use the multi-line editor to write a commit message:

git commit -m "$(gum write --width 50 --placeholder "Summary of changes")"


// Menu: Genius Lyrics Search
let Genius = await npm('genius-lyrics-api')
let geniusUserToken = await env("GENIUS_AUTH_TOKEN")
import { getLyrics, searchSong } from 'genius-lyrics-api';
let songTitle = await arg("Song Title")
let options = {
// Menu: Genius Lyrics Search
let Genius = await npm('genius-lyrics-api')
let geniusUserToken = await env("GENIUS_AUTH_TOKEN")
import { getLyrics, searchSong } from 'genius-lyrics-api';
let songTitle = await arg("Song Title")
let options = {
let Jimp = await npm('jimp')
let width = await arg('New width in pixels')
let selectedFiles = await getSelectedFile();
let filePaths = selectedFiles.split("\n");
for (let filePath of filePaths) {
Jimp.read(filePath, (err, image) => {
if (err) throw err;
body, td, input, textarea, select, div, span {
font-family: -apple-system, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif !important;
}
.Nm .Nt {
border-left: 0px;
}
.aZ6::-webkit-scrollbar {
width: 0px;
let { titleCase } = await npm("title-case");
let selectedText = await getSelectedText();
let value = titleCase(selectedText);
await setSelectedText(value);
let { titleCase } = await npm("title-case");
let { getSelectedText } = await kit("text");
let selectedText = await getSelectedText();
let value = titleCase(selectedText);
await setSelectedText(value);