- Source: https://code.visualstudio.com/api/references/theme-color
- Retrieved: Tue May 13 2025 09:11:22 GMT-0500 (Central Daylight Time)
NOTE: Key/value pairs should be nested under workbench.colorCustomizations
const colorCustomizations = {
const titleChanger = () => { | |
const state = { | |
title: '___Hi there!___' | |
}; | |
const swap = () => { | |
const parts = state.title.split(""); | |
const lastItem = parts.pop(); | |
const firstItem = parts.shift(); |
NOTE: Key/value pairs should be nested under workbench.colorCustomizations
const colorCustomizations = {
const items = Array.from(document.querySelectorAll('main ul li')); | |
const glossary = {} | |
const exampleObject = {}; | |
items.map(x => { | |
const xx = x.textContent.split(':'); | |
const desc = xx[1]?.trim(); | |
const key = xx[0]?.trim(); | |
if (!key.startsWith('The ')) { | |
exampleObject[key] = "#ff0000"; | |
glossary[key] = desc; |
const nodemailer = require('nodemailer'); | |
const sendEmail = async ({to, subject, message, from}) => { | |
const transporter = nodemailer.createTransport({ | |
host: process.env.AWS_SMTP_HOST, | |
port: process.env.AWS_SMTP_PORT, | |
secure: false, | |
auth: { | |
user: process.env.AWS_SMTP_USER, // generated ethereal user | |
pass: process.env.AWS_SMTP_PASS, // generated ethereal password |
const path = require('path'); | |
const TerserPlugin = require("terser-webpack-plugin"); | |
module.exports = { | |
mode: 'development', | |
watchOptions: { | |
ignored: /node_modules/, | |
}, | |
optimization: { | |
minimize: true, |
Array.from(document.querySelectorAll('style, link')).map(x => x.remove()); | |
Array.from(document.querySelectorAll('*')).map(x => { | |
x.setAttribute('stlye', "") | |
}); |
const files = [ | |
"https://archive.org/download/OTRR_Gunsmoke_Singles/Gunsmoke%2052-04-26%20%28001%29%20Billy%20the%20Kid.mp3" | |
] | |
const exec = require('child_process').exec; | |
const downloadFile = (url) => { | |
return new Promise((resolve) => { | |
console.log(`wget ${url} --no-check-certificate`) | |
exec(`wget ${url} --no-check-certificate`, function(err, stdout, stderr) { |
const asyncLocalStorage = { | |
setItem: function (key, value) { | |
return Promise.resolve().then(function () { | |
localStorage.setItem(key, value); | |
}); | |
}, | |
getItem: function (key) { | |
return Promise.resolve().then(function () { | |
return localStorage.getItem(key); | |
}); |
window.onerror = function(errorMessage, filePath, lineNumber, offset, stackObject) { | |
console.log(stackObject) | |
console.log({ | |
'errorMessage' : errorMessage, | |
'filePath' : filePath, | |
'lineNumber' : lineNumber, | |
'offset' : offset, | |
'stackObject' : stackObject, | |
}) | |
} |
/** | |
* Say you have this: {"key": "123", "limit": 20} | |
* But you need this: ?key=123&limit=20 | |
* Use objectToParams... | |
*/ | |
const objectToParams = (obj) => { | |
const params = Object.keys(obj).reduce((acc, key) => { | |
return `${acc}&${key}=${obj[key]}`; | |
}, ''); | |
return params.replace(/&/, '?'); |