Skip to content

Instantly share code, notes, and snippets.

View anthonyheckmann's full-sized avatar

Tony Heckmann anthonyheckmann

View GitHub Profile
@anthonyheckmann
anthonyheckmann / syncedTabsToBookmarksHTML.js
Created November 24, 2023 19:13 — forked from jscher2000/syncedTabsToBookmarksHTML.js
Export Synced Tabs List to "bookmarks.html" file (Browser Console script)
// Run code in Browser Console after enabling chrome debugging --
// about:config => devtools.chrome.enabled => true
// https://developer.mozilla.org/docs/Tools/Browser_Console
try {
var tabPromise = SyncedTabs._internal.getTabClients();
tabPromise.then((arrDevices) => {
if (arrDevices && arrDevices.length > 0){
// Generate a string with the format of a bookmark export file
var d, e, out = '<!DOCTYPE NETSCAPE-Bookmark-file-1>\n<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">\n<TITLE>Bookmarks</TITLE>\n<H1>Bookmarks Menu</H1>\n<DL><p>\n';
const escapeHtmlEntities = function(aText){return (aText || '').replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;').replace(/'/g, '&#39;')};
@anthonyheckmann
anthonyheckmann / update_git_repos.sh
Created February 15, 2022 14:50 — forked from douglas/update_git_repos.sh
Update all git repositories under a base directory
#!/bin/bash
# store the current dir
CUR_DIR=$(pwd)
# Let the person running the script know what's going on.
echo "\n\033[1mPulling in latest changes for all repositories...\033[0m\n"
# Find all git repositories and update it to the master latest revision
for i in $(find . -name ".git" | cut -c 3-); do
@anthonyheckmann
anthonyheckmann / README.md
Created February 26, 2020 15:06 — forked from magnetikonline/README.md
List all Git repository objects by size.

List all Git repository objects by size

Summary

Bash script to:

  • Iterate all commits made within a Git repository.
  • List every object at each commit.
@anthonyheckmann
anthonyheckmann / bootstrap.sh
Created August 14, 2019 14:13 — forked from drmikecrowe/bootstrap.sh
Bash Bootstrap
#!/usr/bin/env bash
APT_PKGS=""
function install {
FILE="$2"
URL="$1/$FILE"
wget $URL -O $FILE
sudo gdebi $FILE
rm $FILE
## Creates a gamma-corrected lookup table
import math
def gamma(nsteps, gamma):
gammaedUp = [math.pow(x, gamma) for x in range(nsteps)]
return [x/max(gammaedUp) for x in gammaedUp]
def rounder(topValue, gammas):
return [min(topValue, round(x*topValue)) for x in gammas]
@anthonyheckmann
anthonyheckmann / .bash_colours
Created August 14, 2018 13:10 — forked from pjf/.bash_colours
pjf's shell prompt with taskwarrior and git
# Reset
Color_Off='\[\e[0m\]' # Text Reset
# Regular Colors
Black='\[\e[0;30m\]' # Black
Red='\[\e[0;31m\]' # Red
Green='\[\e[0;32m\]' # Green
Yellow='\[\e[0;33m\]' # Yellow
Blue='\[\e[0;34m\]' # Blue
Purple='\[\e[0;35m\]' # Purple
@anthonyheckmann
anthonyheckmann / vid_scrape.js
Created July 24, 2017 19:24 — forked from anonymous/vid_scrape.js
Print out list of video links in console for mybrightwheel.com kid's feed
//require jQuery
//assume on https://schools.mybrightwheel.com/students/<MD5 in 8-4-4-4-12 format>/feed
$("video").map(function (one, two, three)
{
var url=$(this).attr('poster');
var re = new RegExp("(.*)(thumbnail.*)");
console.log(re.exec(url)[1]+ "brightwheel-video00000.ts");
})
@anthonyheckmann
anthonyheckmann / bash-history-to-zsh-history.py
Last active January 27, 2017 23:31 — forked from op/bash-history-to-zsh-history.py
Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | bash-history-to-zsh-history >> ~/.zsh_history
import sys
import time
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.