Skip to content

Instantly share code, notes, and snippets.

View tjx666's full-sized avatar
🏃
exercising

YuTengjing tjx666

🏃
exercising
View GitHub Profile
@fabiospampinato
fabiospampinato / fast-npm-run.sh
Last active March 12, 2025 07:24
20x faster replacement for "npm run"
# 20x faster replacement for "npm run"
# - It supports scripts executing a built-in shell function
# - It supports scripts executing a binary found in PATH
# - It supports scripts executing a binary found in node_modules
# - It supports passing arguments and options to scripts
# - It supports reading scripts either via ripgrep (fast) or via jq (slower, but safer)
# - It adds ./node_modules/.bin to the $PATH
# - It handles gracefully when a script has not been found
# - It handles gracefully when "&", "&&", "|", "||", or ENV variables are used, falling back to "npm run"
@joonaspaakko
joonaspaakko / Read and write text.jsx
Created October 11, 2021 07:54
Read and write text example in Adobe extendscript
// In this demo:
// 1. I first prep the output file path
// 2. Then write the text file: "current date and time + some placeholder text"
// - As long as you don't change the path, it gets written next to this script file.
// 3. Then read the text file
// 4. And finally trigger alert() to show the text that was written.
// - At the top it shows each line as an array
// - And below that it just shows the full text as it was written.
@tjx666
tjx666 / cloudSettings
Last active December 25, 2023 01:56
Visual Studio Code Settings Sync Gist
{"lastUpload":"2022-02-14T06:16:33.865Z","extensionVersion":"v3.4.3"}
@phillipskevin
phillipskevin / 0-readme.md
Last active September 11, 2024 07:16
chrome-extension-accessing-dom-and-window

Description

This gist shows two techniques for (simultaneously) accessing the DOM and the window from a Chrome extension

solution 1: eval aka the easy way

You can run arbitrary code in the page using chrome.devtools.inspectedWindow.eval( ... )

This solution is shown in the files below prefixed with 1-.