Make sure you have the minimum dependencies (e.g. you have run yarn add selenium-webdriver
), and edit the file with your chromedriver bin info.
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
/** | |
* @file Google Apps Script Wrapper around Kasa API | |
* @license MIT | |
* @see https://gist.github.com/joshuatz/5266d8cc85ef3e0e67561de3573a1ff5 | |
* @author Joshua Tzucker | |
* @see | |
* - https://joshuatz.com/posts/2020/scripting-my-morning-wake-up-alarm-and-lights-with-android-and-kasa/ | |
* - https://cheatsheets.joshuatz.com/random/tp-link-kasa/ | |
*/ | |
// @ts-check |
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 vidPopped = false; | |
document.querySelectorAll('video').forEach(vid => { | |
// Override disabling features | |
vid.removeAttribute('disablepictureinpicture'); | |
vid.disablePictureInPicture = false; | |
// Only pop right away if video is playing, or on Hulu | |
if ((!vid.paused || vid.id === 'content-video-player') && !vidPopped) { | |
if (typeof vid.requestPictureInPicture === 'function') { | |
vid.requestPictureInPicture() | |
.then(() => { |
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
/** | |
* @file Mini-API to export data from a Google Sheet, created for fun | |
* @author Joshua Tzucker | |
* @see https://joshuatz.com/posts/2021/google-sheets-faster-data-export-options | |
* @license MIT | |
* @see https://gist.github.com/ronaldsmartin/47f5239ab1834c47088e (alternative) | |
*/ | |
// @ts-check | |
/// <reference path="/yarn-global/@types/google-apps-script/index.d.ts" /> |
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
package com.joshuatz.webviewblock | |
import android.os.Bundle | |
import android.util.Log | |
import android.webkit.* | |
import androidx.appcompat.app.AppCompatActivity | |
// Leave off www. | |
val BannedDomains: Array<String> = arrayOf("facebook.com", "connect.facebook.net") | |
val BannedUrlPatterns: Array<Regex> = arrayOf(Regex("\\.taboola\\.")) |
Stashing this here in case I need it in the future - used this to patch build output from a vite
based Svelte project (non-svelte-kit) to be able to be deployed from a sub-directory with plain HTML serving.
Requires walkdir
and fs-extra
.
If you want to run this and capture the results to a log file, you should make sure to also capture stderr
. You can use something like:
./bulk_folder_runner.bat > log.txt 2>&1
If running via Task Scheduler, please note that Task Scheduler does not properly record exit error codes.
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
(() => { | |
// With default shorts filter - dry run mode | |
new YouTubeHistoryCleaner(undefined, true); | |
// dryRunMode = off (actually delete stuff) | |
new YouTubeHistoryCleaner(undefined, false); | |
// With custom filter, preserving history for certain accounts | |
const approvedAuthors = [ |
OlderNewer