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
// ==UserScript== | |
// @name Smartsheet - Enable text selection and context menu clicks | |
// @version 1.1 | |
// @author lamchau | |
// @description Enables text selection and context menu clicks from published Smartsheets | |
// @updateUrl https://go/smartsheet-hack | |
// @match https://app.smartsheet.com/b/publish?* | |
// @icon https://www.google.com/s2/favicons?domain=smartsheet.com | |
// @run-at document-end | |
// ==/UserScript== |
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
from typing import Union, Callable | |
import types | |
# 3p libraries | |
from dateutil.relativedelta import relativedelta # type: ignore | |
from visidata import Sheet, Column, SettableColumn, asyncthread, vd # type: ignore | |
import pandas as pd # type: ignore | |
def get_frequency(column: Column, |
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
/** | |
* 1. [If not owner] Create a copy of the Google Documents link | |
* 2. Publish to web | |
* 3. [Chrome] Inspect page | |
* 4. Open Developer Console | |
* 5. Paste script below | |
* 6. From clipboard, paste to $EDITOR | |
* 7. Optional: Open multiple URLs Chrome extension | |
* - https://chrome.google.com/webstore/detail/open-multiple-urls/oifijhaokejakekmnjmphonojcfkpbbh | |
*/ |
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
#!/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
var util = require('util'); | |
var chalk = require('chalk'); | |
var LOG_TYPE = chalk.bold.black('[') + '%s' + chalk.bold.black(']') + ':'; | |
var ALL = { | |
type: 'ALL' | |
}; | |
var TRACE = { | |
type: 'TRACE', | |
fn: console.log, |
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): |