Chrome stores .user.js
scripts in a .ldb
, which isn't in a user accessible format to recovery. On some versions of macOS the provided python script can't compile the leveldb package. As a workaround, we can use the node level package to recover our userscripts.
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 python3 | |
import argparse | |
import datetime | |
import json | |
import logging | |
import os | |
import re | |
import requests | |
import sys |
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 | |
# used to execute branch deletes in parallel, shows progress bar | |
if ! [ -x "$(command -v parallel)" ]; then | |
echo "ERROR: Missing command 'parallel'" | |
exit 1 | |
fi | |
if ! [ -x "$(command -v git)" ]; then | |
echo "ERROR: Missing command 'git'" |
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
Array.from(document.querySelectorAll('svg.globe-svg-icon')) | |
.map(x => x.parentNode.click()); |
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
const triggerMouseEvent = (node, eventType) => { | |
const clickEvent = document.createEvent('MouseEvents'); | |
clickEvent.initEvent(eventType, true, true); | |
node.dispatchEvent(clickEvent); | |
}; | |
const clapButton = document.querySelector('[aria-label="clap"]').parentNode; | |
const click = button => { | |
triggerMouseEvent(button, 'mousedown'); | |
triggerMouseEvent(button, 'mouseup'); | |
}; |
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 fish | |
set -l boottime_in_seconds (sysctl -n kern.boottime | rg '(?:\bsec\s+=\s+)(\d+)' --replace '$1' --only-matching) | |
set -l now_in_seconds (date +%s) | |
set -l seconds_elapsed (math $now_in_seconds - $boottime_in_seconds) | |
set -l uptime (awk -v seconds_elapsed=$seconds_elapsed ' | |
BEGIN { | |
ONE_HOUR_IN_SECONDS = int(60 * 60); | |
ONE_DAY_IN_SECONDS = int(24 * ONE_HOUR_IN_SECONDS); | |
ONE_WEEK_IN_SECONDS = int(7 * ONE_DAY_IN_SECONDS); |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 python3 | |
import argparse | |
import requests | |
import sys | |
TYPES = { | |
'bytes': { | |
'param': 'bytes', |
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 python3 | |
import sys | |
from itertools import cycle | |
import time | |
# https://github.com/yarnpkg/berry/blob/e6e035c901ce921af890be9401076f0123e5393d/packages/yarnpkg-core/sources/StreamReport.ts | |
PROGRESS_FRAMES = cycle(['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏']) | |
for i in range(60): |
Homebrew is pretty frustrating for downgrading, here are the steps (last known version to work with fish
is v2.10)
Steps for people in the future that need to do this:
# remove current version
brew uninstall navi
# find formula/bottle
# launches url
brew info --github navi