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
Instructions for running peloton-to-garmin (https://github.com/philosowaffle/peloton-to-garmin) in Cloud Run, assuming you're doing this from Windows Powershell v7.4.6: | |
$env:PROJECT_ID="your-gcp-project-id" | |
$env:REGION="us-west1" | |
$env:JOB_NAME="peloton-to-garmin" | |
gcloud config set core/project $env:PROJECT_ID | |
# create two GCS buckets - https://cloud.google.com/sdk/gcloud/reference/storage/buckets/create | |
# one for the output, one for the configuration file |
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
<style type='text/css'> | |
/* https://stackoverflow.com/a/63574369/48082 */ | |
body, body #index .main-content .home-page .home-page-cta h1.home-page-cta-title { | |
font-family: 'SF Pro Text',-apple-system,BlinkMacSystemFont,Roboto,'Segoe UI',Helvetica,Arial,sans-serif,'Apple Color Emoji','Segoe UI Emoji','Segoe UI Symbol'; | |
} | |
body #index > .main-content { | |
padding: 0; | |
background-color: #7d7d7d; | |
background-image: revert; |
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
// getTokenWithRetry.js | |
// ------------------------------------------------------------------ | |
// | |
// Example JS policy configuration: | |
// | |
// Note: you need the authUrl Property. | |
// | |
// <Javascript name='JS-Retrieve-Token' timeLimit='12000' > | |
// <Properties> | |
// <Property name='authUrl'>https://url-for-token-endpoint/token</Property> |
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
{ | |
"info": { | |
"_postman_id": "ac53fc95-c464-4413-8330-0ae96d1bfd1e", | |
"name": "OAuth2 Client Credentials", | |
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | |
"_exporter_id": "22976572" | |
}, | |
"item": [ | |
{ | |
"name": "Request-for-Token (Client credentials", |
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
$ node ./getIdTokenWithServiceAccount.js --keyfile ./my-service-account-key-a8ef19f432a9.json --audience https://foo-bar/bam | |
jwt payload: { | |
"iss": "[email protected]", | |
"aud": "https://oauth2.googleapis.com/token", | |
"iat": 1724976008, | |
"exp": 1724976068, | |
"target_audience": "https://foo-bar/bam" | |
} | |
assertion: eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzaGVldC13cml0ZXItMUBkY2hpZXNhLWFyZ29saXMtMi5pYW0uZ3NlcnZpY2VhY2NvdW50LmNvbSIsImF1ZCI6Imh0dHBzOi8vb2F1dGgyLmdvb2dsZWFwaXMuY29tL3Rva2VuIiwiaWF0IjoxNzI0OTc2MDA4LCJleHAiOjE3MjQ5NzYwNjgsInRhcmdldF9hdWRpZW5jZSI6Imh0dHBzOi8vZm9vLWJhci9iYW0ifQ.rxVh1-rpXxn67zh94LBDLJm3j2jDqzlXXxV9AqUVtVYDVoKvLy5PH7oBFxrO9RgnhvYkxmbYhMWC5bKmAsaB1J7Y7m3Ch7N2C05kzvle8RHImMsIdW7_nLEISKYgZLmUTQh_oqqgyysmY6C6q0Hadt7yqJ7rZz1W_-wq2fV0hZVTAZLKlUtXefKrwK90Myzo3yZg5tA7GTFUY23b8D4gSEkMxjGR0Ke3PwR4N9SK4FKy8YlYeDsOUGfX2GNmqEIQpD7AfjLBUbnFJeKVL04c8PKXnvUAiffeqfCkwcVpVNoyFexEsB2e9ZUUL2H4A7tRR4cA0DU3OL0dkm3Bhd9qHQ |
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 | |
# -*- mode:shell-script; coding:utf-8; -*- | |
# | |
# Works with Apigee Edge. | |
# | |
proxyname="$1" | |
[[ -z "$proxyname" ]] && printf "specify a proxy name as argument\n" && exit 1 | |
MISSING_ENV_VARS=() |
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 | |
# -*- mode:shell-script; coding:utf-8; -*- | |
# | |
# Works with Apigee X/hybrid. | |
# | |
proxyname="$1" | |
[[ -z "$proxyname" ]] && printf "specify a proxy name as argument\n" && exit 1 | |
MISSING_ENV_VARS=() |
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
// ==UserScript== | |
// @name autodelete-Youtube-watch-history-shorts - youtube.com | |
// @namespace youtube | |
// @description automatically deletes watch history of shorts. | |
// @match https://myactivity.google.com/product/youtube/ | |
// @grant none | |
// @version 0.1.0 | |
// @run-at document-end | |
// @license Apache 2.0 | |
// ==/UserScript== |
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
// orig: https://gist.github.com/miketromba/334282421c4784d7d9a191ca25095c09 | |
// Paste the script into your console on this page: https://myactivity.google.com/product/youtube | |
const ENABLED = true; | |
const MIN_DURATION_MS = 1000 * 60 * 1.5; // 1:30 mins | |
const CHECK_FOR_CONFIRM_INTERVAL = 2000; | |
let CYCLE_INTERVAL = 1800; // Amount of time in MS to wait between deletion (more likely to fail with a small number) | |
let wantCycling = true; | |
const VERY_LONG_DURATION = MIN_DURATION_MS * 10; |
NewerOlder