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
# Developed for Firefox on Mac | |
# | |
# 1. Empty your Downloads folder | |
# 2. Create a subdirectory under Downloads called `google-photos-download` | |
# 3. Run the following script with your Downloads folder as the working directory | |
# 4. Through your browser, one photo at a time (starting with the first until the last), select it with the mouse and press Shift+D to download | |
# once your browser releases the lock on the file, the script will move it to ./google-photos-download and rename it so its name reflects its order | |
# | |
# I found it helpful to have the Downloads and google-photos-download folders open and visible in Finder windows to get feedback about | |
# what the script is doing. I also have the terminal window in a corner to see the script output, and Firefox on the rest of the screen |
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 each of the order IDs be links to the receipt */ | |
Array.from(document.querySelectorAll('[class*="OrderData"] [class*="OrderDataText"]:first-child')).forEach(orderSpan => { | |
const orderId = orderSpan.textContent.replace(/^#/, ''); | |
const url = `/user/account/orders/${orderId}/details`; | |
orderSpan.innerHTML = `<a href="${url}">#${orderId}</a>`; | |
}); | |
/* let each of the dates show day of week. Highlight the Fridays */ | |
Array.from(document.querySelectorAll('span')) | |
.filter(span => span.textContent.trim().match(/202[0-9]-\d\d-\d\d/)) |
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 EmlParser = require('eml-parser'); | |
const fs = require('fs'); | |
const inputFile = process.argv[2]; | |
if (!inputFile) throw new Error("Missing input file path argument"); | |
if (!inputFile.match(/\.eml$/)) throw new Error("Only .eml files supported"); | |
if (!fs.existsSync(inputFile)) throw new Error(`Couldn't find file ${inputFile}`); | |
const emailFile = fs.createReadStream(inputFile); |
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
/tmp/fixup ☛ git branch start | |
/tmp/fixup ☛ date > $(date +%s) # create a new file with the current date in it, just for something to commit | |
/tmp/fixup ☛ git add -A && git commit --fixup start -a | |
[master c037a95] fixup! good | |
1 file changed, 1 insertion(+) | |
create mode 100644 1605488610 | |
/tmp/fixup ☛ date > $(date +%s) | |
/tmp/fixup ☛ git add -A && git commit --fixup start -a | |
[master 26f9ec1] fixup! good | |
1 file changed, 1 insertion(+) |
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
OIFS="$IFS" | |
IFS=$'\n' | |
for file in `git ls-files`; do | |
echo "$(git rev-list HEAD "$file" | tail -n 1 | xargs git log -n 1 --date=short --pretty=format:%ad) $file" | |
done | |
IFS="$OIFS" |
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
commit bf688814118231ecc64365e93e276f7fefa0652f | |
Author: Alexander Bird <[email protected]> | |
Date: Thu Jan 30 19:39:22 2020 -0800 | |
Add Jest and 'npm test' | |
diff --git a/babel.config.js b/babel.config.js | |
new file mode 100644 | |
index 0000000..8249e41 | |
--- /dev/null |
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
wget --mirror --page-requisites --html-extension --convert-links --no-host-directories example.com |