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
/* exported fetchComments */ | |
'use strict'; | |
/** Fetches Reddit comment thread and then writes it to console | |
* @param {string} siteURL - URL of the post we are checking for */ | |
exports.fetchComments = () => { | |
const siteURL = process.env.site_url; | |
const bucketName = process.env.bucket_short_name; | |
const bucketDir = process.env.bucket_dir; | |
const {Storage} = require('@google-cloud/storage'); |
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 | |
# Script to produce documentation skeleton | |
oops() { | |
echo "Exit Code: $? ~~ Command before oops: $this_command" | |
tput bold | |
echo "$@" | |
tput sgr0 | |
exit 1 | |
} | |
main_function_calls() { |
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 | |
rm -rf /var/tmp/cleaned_posts | |
mkdir -p /var/tmp/cleaned_posts | |
while read -r post ; do | |
awk '/image:/ { our_image=$2 } /<img class/ { print "![For the Cure of Text](" our_image ")";next } { print $0 }' "$post" > /var/tmp/cleaned_posts/"$post" | |
done <<< "$(find . -name "*.md")" |
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 | |
if [ "$1" == "--patcher" ] ; then | |
find diffs/ -type f -exec patch {} {} ';' | |
elif [ "$1" == "--diff" ] ; then | |
rm -rf diffs~ | |
mv diffs diffs~ | |
diff -r mediumish-theme-jekyll/ dist/ | grep -v '^Only in' |\ | |
awk '/^diff -r / { gather=1 ; | |
target=$4 ; |
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://www.reddit.com/r/linux_gaming/search.json?q=author%3Abryanindurham&restrict_sr=1 | |
// https://www.reddit.com/wiki/search | |
// Get Command Line Arguments | |
filename=process.argv[2]; | |
console.log("Checking: " + filename); | |
// Read the file from command line | |
fs = require('fs') | |
fs.readFile(filename, 'utf8', |