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
javascript: window.sleepFn = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
window.processingLog = false; | |
window.processedLogs = 0; | |
clearInterval(window.roundingInterval); | |
window.visibleTogglEvents = Array.from(document.querySelectorAll(".rbc-event")); | |
window.visibleTogglEventsCount = window.visibleTogglEvents.length; | |
window.roundingInterval = setInterval(async () => { | |
if (window.processingLog) { | |
return; | |
} |
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
#!/usr/bin/env bash | |
LC_NUMERIC="en_US.UTF-8" | |
START_TIME=$SECONDS | |
set -e | |
echo "-----START GENERATING HLS STREAM-----" | |
# Usage create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME] | |
[[ ! "${1}" ]] && echo "Usage: create-vod-hls.sh SOURCE_FILE [OUTPUT_NAME]" && exit 1 | |
# comment/add lines here to control which renditions would be created |
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
#!/usr/bin/python | |
"""Replacement for htpasswd""" | |
# Original author: Eli Carter | |
import os | |
import sys | |
import random | |
from optparse import OptionParser | |
# We need a crypt module, but Windows doesn't have one by default. Try to find |
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 -e | |
# A SHORT DESCRIPTION OF YOUR SCRIPT GOES HERE | |
# USAGE: | |
# DESCRIPTION OF ENV VARS HERE | |
############################################################################### | |
set -e # exit on command errors (so you MUST handle exit codes properly!) | |
set -o pipefail # capture fail exit codes in piped commands | |
#set -x # execution tracing debug messages | |
# Get command 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
// Takes [count] of items and the [partition] (array of percentages) to | |
// distribute against. Returns an array of integers that sums to [count]: | |
// an integer composition weighted by the partition. | |
// | |
// We don't use the Bresenham algorithm because it doesn't provide the best | |
// results for low values of [count]. | |
function DISTRIBUTE(count, partition) { | |
// Custom function in Apps Script takes a 2D array. We're only interested in | |
// the first row. | |
partition = partition[0]; |