Skip to content

Instantly share code, notes, and snippets.

View TheToddLuci0's full-sized avatar

TheToddLuci0

View GitHub Profile
@TheToddLuci0
TheToddLuci0 / cantrill_stats.js
Created December 29, 2023 16:51
Quick hack to find the number of videos and average length in one of the lessons on learn.cantrill.io. Will probably also work on other teachable platforms, but that's where this was originally written for.
function conv(time){
let s = time.split(':');
return parseInt(s[0]) + (parseInt(s[1])/60);
}
let names = document.getElementsByClassName("lecture-name");
let total_time = 0
let videos = 0
const re = /\d+:\d\d/

Keybase proof

I hereby claim:

  • I am thetoddluci0 on github.
  • I am thetoddluci0 (https://keybase.io/thetoddluci0) on keybase.
  • I have a public key ASCpOTdZMcFJ_5ETuzC_q_6yjAonuHqgkyIKQWH44NCj2go

To claim this, I am signing this object:

@TheToddLuci0
TheToddLuci0 / kill_container.ps1
Created February 11, 2020 15:29
Helper script to make killing background docker containers easier
<#
.SYNOPSIS
Script to kill docker containers running in the background
.PARAMETER target
The line number of `docker ps` output that represents the container to kill
.NOTES
Author: @TheToddLuci0
@TheToddLuci0
TheToddLuci0 / git_remote_sync.sh
Last active January 14, 2020 15:05
Automatically sync multiple git remotes.
#!/usr/bin/env bash
# Simple bash script to sync an arbitrary number of git remotes.
# Should be fairly platform independant. (Confirmed to work with git bash on windows,
# and AWS CodeCommit remotes.)
#
# Written by @TheToddLuci0
remotes=($(git remote -v | awk '{print $1}' | uniq ))
@TheToddLuci0
TheToddLuci0 / branch_killer.sh
Created May 24, 2019 18:35
Automatically remove old branches that haven't been touched in a while
#!/usr/bin/env bash
######################################################################
# This script delets all branches that have not been commited to in #
# the last 100 days. This is non reversable, so make sure you know #
# you are doing. #
# Author: TheToddLuci0 #
######################################################################
echo "" > deleted.txt