Skip to content

Instantly share code, notes, and snippets.

View Jonathan-Mckenzie's full-sized avatar
🚀

j mck Jonathan-Mckenzie

🚀
  • Northern California
View GitHub Profile
@Jonathan-Mckenzie
Jonathan-Mckenzie / Request+Async.swift
Last active June 14, 2021 15:39
Vapor Request+AsyncRetry recursively retry async work until succeeded or timeout
import Foundation
import Vapor
/// Request+AsyncRetry
/// Asyncrhonously retries a piece of work with an eventual successful outcome
///
/// - Parameters:
/// - retryCount: the total number of retries before giving up
/// - usDelayTimeout: number of microseconds to delay between each failed attempt
/// - job: async function to perform the work
@Jonathan-Mckenzie
Jonathan-Mckenzie / readme.md
Last active February 2, 2024 13:52
Give everyone in your strava feed a kudos

Give kudos to every event in your feed

  1. Navigate to the main feed page of Strava in a web browser:
    https://www.strava.com/dashboard?num_entries=100
  2. Replace the "100" in the above URL with whatever number of activities you wish to give kudos to
  3. Open Developer Tools in your web browser and navigate to the console
  4. Paste the script below into the console and press enter:
@Jonathan-Mckenzie
Jonathan-Mckenzie / index.js
Last active June 5, 2021 16:20
Lambda Warmer... by using a Lambda (node.js)
/*
Setup a cloudwatch trigger to call this at an interval slightly less than AWS's timeout for making your lambdas cold.
*/
const https = require('https');
// add new lambda endpoints here
const lambdaHttpEndpoints = [
// add endpoints here
// e.g. "http://example.com",
];