This file contains 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
// Mirriam-Webster WOTD Templater User Script: | |
// Include this file in your Templater plugin User Scripts folder | |
// Use within your daily note templater template like this: | |
// <% tp.user.getWOTD(tp.date.now("YYYY-MM-DD", 0, tp.file.title, "YYYY-MM-DD")) %> | |
function fetchWordOfTheDay() { | |
const rssUrl = 'https://www.merriam-webster.com/wotd/feed/rss2'; | |
return new Promise((resolve, reject) => { |
This file contains 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
if (!window.ripperLinks) window.ripperLinks = []; | |
window.ripperCount = 0; | |
window.ripperFunc = function(){ | |
document.querySelectorAll('article [role=link]').forEach(el => { | |
ripperLinks.push(el.href); | |
}); | |
let uniqueLinks = ripperLinks.filter(function(elem, index, self) { | |
return index === self.indexOf(elem); | |
}); | |
ripperLinks = uniqueLinks; |
This file contains 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
//https://api.chess.com/pub/player/{username}/games/2023/02 | |
(async function main () { | |
async function getChessGamesForMonth(username, year, month) { | |
const res = await fetch(`https://api.chess.com/pub/player/${username}/games/${year}/${month}`); | |
if (res.ok) { | |
const data = await res.json(); | |
return data.games | |
} else { | |
console.error('Problem loading chess.com games from API', res); |
This file contains 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
let data = { | |
"current_condition": [ | |
{ | |
"FeelsLikeC": "5", | |
"FeelsLikeF": "41", | |
"cloudcover": "75", | |
"humidity": "53", | |
"localObsDateTime": "2023-02-23 03:03 PM", | |
"observation_time": "03:03 PM", | |
"precipInches": "0.0", |
This file contains 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 { Writable } from 'stream' | |
export default (options) => { | |
const levels = { | |
// https://github.com/pinojs/pino/blob/master/docs/api.md#logger-level | |
10: `\x1b[2m[>]\x1b[0m`, //trace | |
20: `\x1b[35m[DEBUG]\x1b[0m`, //debug | |
30: `\x1b[36m[>]`, //info | |
40: `\x1b[33m[?]`, //warn | |
50: `\x1b[31m[!]`, //error |
This file contains 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
/* | |
@replete's userChrome.css | |
https://gist.github.com/replete/ba62b8bc9cf61c1e1f8a2ac2eb3907f9 | |
multi-row styles taken from: | |
https://github.com/MrOtherGuy/firefox-csshacks | |
compact toolbar styles stolen from somewhere before I decided to do a better job of it | |
Tweaked these two contributions a bit, but can't remember what I did. My styles are at the bottom |
This file contains 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
Step 1: | |
Create a new Bitbucket pipeline with the following yaml, then add environment variables (in the bitbucket web UI) for FTP_HOST, FTP_USERNAME, FTP_PASSWORD - update host path below accordingly. | |
Step 2: Commit this file, once a build passess successfully and it has initialized Git FTP, proceed to Step 3 | |
```bitbucket-pipelines.yml | |
image: atlassian/default-image:3 | |
pipelines: | |
default: |
This file contains 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/bash | |
log() { echo -e "\x1b[0m\033[1;30m$(date +%H:%M:%S)\x1b[0m $@ \x1b[0m" ; } | |
INFO='\x1b[0m\033[1;30m[>]\x1b[0m' | |
OK='\x1b[0m\033[1;32m[✔]\x1b[0m' | |
WARN='\x1b[0m\033[1;33m[?]' | |
ERROR='\x1b[0m\033[1;31m[!]' | |
NODEVER=v17.0.1 | |
MONGODBNAME=appdb |
This file contains 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
const fs = require('fs') | |
const exec = (cmd) => require('child_process').execSync(cmd, { shell: '/bin/bash' }) | |
try { | |
let nodePath = exec('which node').toString().replace('\n', '') | |
let nodeVer = exec('node -v').toString().replace('\n', '') | |
const expectedNodeVer = fs.readFileSync('.nvmrc', 'utf-8').replace('\n', '') | |
const npmVer = exec('npm -v').toString().replace('\n', '') | |
const nodeVerComparison = versionCompare(nodeVer.substring(1), expectedNodeVer.substring(1)) |
This file contains 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
const color = { | |
reset: '\x1b[0m', | |
bright: '\x1b[1m', | |
dim: '\x1b[2m', | |
underscore: '\x1b[4m', | |
blink: '\x1b[5m', | |
reverse: '\x1b[7m', | |
hidden: '\x1b[8m', | |
fgBlack: '\x1b[30m', |
NewerOlder