Skip to content

Instantly share code, notes, and snippets.

View jedfonner's full-sized avatar

Jed Fonner jedfonner

View GitHub Profile
@jedfonner
jedfonner / bookmarklet.js
Created November 29, 2024 13:10 — forked from ping/bookmarklet.js
Bookmarklet to add download links for audiobooks in the Overdrive loans page
/* 1. Paste this entire gist over at https://mrcoles.com/bookmarklet/ to generate a bookmarklet */
/* 2. Use a meaningful Name like: 🎧 📖 Links */
/* 3. Drag the generated bookmarklet link to your Bookmarks Toolbar. */
/* 4. Click on the bookmarklet when you're on the Overdrive loan page, e.g. https://yourlibrary.overdrive.com/account/loans */
/* 5. The "Download MP3 audiobook" link should appear like it used to. */
$('a[data-format-id="audiobook-overdrive"]').each(function() {
var listenBtn = $(this);
if (listenBtn.hasClass('script-added')) {
@jedfonner
jedfonner / install_portmaster_to_var.sh
Last active October 20, 2024 12:06 — forked from WinkelCode/install_portmaster_to_var.sh
Removes --show-progress flags which caused errors on Aurora
#!/usr/bin/env bash
set -e # Exit on error
if [ "$EUID" -ne 0 ]; then
echo "To ensure correct permissions, this script must be run as root."
exit 1
fi
install_location="/var/lib/safing-portmaster" # Must not include trailing slash
@jedfonner
jedfonner / index.js
Created August 2, 2021 23:54
Example of a Firebase Cloud Function integrating with DialogFlow
const functions = require('firebase-functions');
const cors = require('cors')({ origin: true });
const uuid = require('uuid');
// https://cloud.google.com/dialogflow/es/docs/reference/libraries/nodejs
// https://googleapis.dev/nodejs/dialogflow/latest/index.html
const dialogflow = require('@google-cloud/dialogflow');
// The ID of the GCP project where your Dialogflow agent is deployed
const PROJECT_ID = 'your-project-id';