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 { cwd } = require('node:process') | |
const path = require('path') | |
const readline = require('readline') | |
const { | |
glob |
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
/* | |
* Xero doesn't offer a way to natively download all attachments on a page. | |
* This script just manually opens every attachment and clicks the download button | |
*/ | |
const sleep = (ms) => new Promise((r) => setTimeout(r, ms)); | |
async function start() { | |
for (const pdf_button of document.querySelectorAll(".attachment a")) { | |
pdf_button.click(); | |
await sleep(2000); |
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 | |
# This script takes a PDF or list of PDFs and outputs a file(s) | |
# named <file>_scanned.pdf that looks like it has been scanned | |
# | |
# Requires imagemagic and popper to be installed (brew install imagemagick poppler) | |
# | |
# Accepts: a list of files | |
# Usage: ./<scriptfilename> pdf1.pdf pdf2.pdf | |
# | |
# To use as a macOS automator quick action you need to: |
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
// Grabs prices from https://octopuscomparison.netlify.app/ and totals them up | |
// Simply paste this into the javascript console | |
// Relies on some hacks to trigger React onchange events | |
let allPrices = []; | |
(function() { | |
function setNativeValue(element, value) { | |
const valueSetter = Object.getOwnPropertyDescriptor(element, 'value').set; | |
const prototype = Object.getPrototypeOf(element); |
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
{ | |
"nickname": "Name here", | |
"subtitle": "Subtitle here", | |
"background": [255, 0, 0], | |
"fg_color": [255, 255, 255], | |
"fg_sub_color": [0, 255, 255], | |
"background_night": [128, 0, 0], | |
"fg_color_night": [255, 255, 255], | |
"fg_sub_color_night": [0, 0, 255] | |
} |
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
function copytext(a) { | |
var b = document.createElement("textarea"); | |
b.innerText = a, document.body.appendChild(b), b.select(), document.execCommand("copy"), b.remove() | |
} | |
parts = new Set(); | |
parts.add(document.querySelector('meta[name="current-bucket-name').content); | |
parts.add(document.querySelector('meta[name="current-dock-tool-title"]').content); | |
parts.add(document.querySelector('meta[name="current-recording-title"]').content); | |
page_name = Array.from(parts).join(" › "); |
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
function copytext(a) { | |
var b = document.createElement("textarea"); | |
b.innerText = a, document.body.appendChild(b), b.select(), document.execCommand("copy"), b.remove() | |
} | |
copytext("@cobot deploy harvestapp: PR " + document.querySelector('.gh-header-number').innerText + " - " + document.querySelector('.js-issue-title').innerText.trim() + ", see " + window.location); |
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
cat *.metadata.json | jq -c '"\(.distance), \(.duration), \(.startTime.time), \(.avgHeartrate), \(.maxHeartrate), \(.activityType.internalName)"' | grep "Running" | grep -v "Treadmill" |
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
JSON.stringify($('.filter-susd-recommends').map(function() { return $(this).find('.eg-games-page-element-1').text() }).toArray()) |
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
//= Usage | |
// Update the config below | |
// Paste this file into the console on the edit geeklist page | |
// Call addAllGames() | |
// Config | |
let gamelist = []; // Set this to an array containing the names of games you wish to add | |
// e.g. let gamelist = ["Azul", "Carcassonne", "Codenames"]; | |
// Exposed so they can be logged |
NewerOlder