This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(async function deleteNthNotebookLMItem() { | |
try { | |
// Prompt user for number of items to delete | |
const userInput = prompt("How many items do you want to delete?", "0"); | |
// Handle cancel (returns null) or invalid input | |
if (userInput === null) { | |
throw new Error("Operation cancelled by user"); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
'use strict'; | |
// Configuration constants | |
const CONFIG = { | |
SELECTORS: { | |
DEGREE_BADGE: '.social-details-reactors-modal >* .artdeco-entity-lockup__degree', | |
CONTAINER: '.social-details-reactors-modal' | |
}, | |
DEGREE_TEXT: '2nd', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { createContext, useContext, useEffect, useReducer, useRef } from 'react'; | |
import type { ReactNode } from 'react'; | |
// @ts-expect-error | |
const context = createContext<QueryClient>(); | |
export function QueryClientProvider({ | |
client, | |
children, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function getProductsListOfNamesLinksPrices() { | |
const containerQuery = "div.horizontal-type__product_details"; | |
const products = Array.from(document.querySelectorAll(containerQuery)).map( | |
(containerNode) => { | |
try { | |
const linkNode = containerNode.querySelector("div > a"); | |
const nameContainerNode = linkNode.querySelector( | |
"div.horizontal-type__product_name", | |
); | |
const quantityNode = nameContainerNode.querySelector( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
const markdownTableStrArr = [ | |
"|Product Name\t|Link\t|Price\t|", | |
"|---|---|---|", | |
...Array.from(document.querySelectorAll(".mini-type__product_details")).map( | |
(x) => { | |
const link = x.querySelector("a"); | |
return `|${link.querySelector("div.mini-type__product_name").innerText}|${link.href}|${x.nextSibling.innerText.split(" ").join("")}`; | |
}, | |
), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {{debug: boolean}} options | |
* @returns {Promise<void>} | |
*/ | |
(function getContactInfo(options) { | |
/** | |
* | |
* @param {`${string}-${number}`}_birthday | |
* @returns | |
*/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
current_branch_name=$(git rev-parse --abbrev-ref HEAD) | |
# Check if $1 is empty | |
if [ -z "$1" ]; then | |
# Fallback to the current Git branch name | |
echo "[WARN] 1st argument is empty, falling back to current_branch_name: $current_branch_name" | |
branch_name=$current_branch_name | |
else | |
# Use the provided argument as the branch name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function adjustVideoPlaybackSpeed(options) { | |
var video = document.querySelector("video"); | |
if (!video) return window.alert("No video available in page"); | |
newPlaybackRate = options && typeof options === 'object' && options.playbackRate && typeof options.playbackRate === 'number' ? options.playbackRate : 1; | |
video.playbackRate = newPlaybackRate; | |
video.play(); | |
if (newPlaybackRate === 1) window.confirm("Video playback speed is now default speed"); | |
if (newPlaybackRate > 1) window.confirm("Video playback speed is now " + newPlaybackRate + " times the normal speed"); | |
})({playbackRate: 1.5}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
##Device = Desktops | |
##Screen = 1281px to higher resolution desktops | |
*/ | |
@media (min-width: 1281px) { | |
} |