Skip to content

Instantly share code, notes, and snippets.

@t0m
t0m / gist:81a79653c9f331a3e89ada180c6e8b61
Last active March 8, 2024 19:15
youtube shorts auto-progress
let CheckTickInterval = null;
checkTicks = function() {
let progressBar = document.getElementById('progress-bar-line');
let curProgress = null;
let ariaValue = parseInt(progressBar.attributes['aria-valuenow'].value);
if (ariaValue > 0) {
curProgress = ariaValue;
}
if (curProgress > 98) {
import logging
import sqlalchemy
import sys
from sqlalchemy.engine.base import Engine
import sqlalchemy.event
class ExplainPlan(object):
"""
Context manager that outputs the postgres explain plan for every
query executed within to stdout or a file, if provided with "logfile"
@t0m
t0m / make.bat
Last active December 11, 2015 07:18 — forked from kraz/make.bat
Windows build for bootstrap 3.0.0-wip
@echo off
SET BOOTSTRAP=.\docs\assets\css\bootstrap.css
SET BOOTSTRAP_LESS=.\less\bootstrap.less
SET "CHECK= "
SET HR=##################################################
SETLOCAL ENABLEDELAYEDEXPANSION
if [%1]==[] goto build
@t0m
t0m / make.bat
Last active December 11, 2015 07:09 — forked from kraz/make.bat
uglifyjs didn't like the paths in the original
@echo off
SET BOOTSTRAP=.\docs\assets\css\bootstrap.css
SET BOOTSTRAP_LESS=.\less\bootstrap.less
SET BOOTSTRAP_RESPONSIVE=.\docs\assets\css\bootstrap-responsive.css
SET BOOTSTRAP_RESPONSIVE_LESS=.\less\responsive.less
SET "CHECK= "
SET HR=##################################################
SETLOCAL ENABLEDELAYEDEXPANSION