View car-cost.py
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 numpy_financial as npf | |
import numpy as np | |
import typing as t | |
import json | |
""" | |
TODO: | |
- opportunity cost calc | |
""" |
View wacom.py
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 | |
from typing import Literal, Union | |
from py_utils.v1.bash import get_output, run | |
import dataclasses | |
import functools | |
""" | |
from Arch Linux wiki: |
View personal-capital.js
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
hmd = hmd || {}; | |
if (hmd.download === undefined) { | |
hmd.download = (filename, text) => { | |
var element = document.createElement('a'); | |
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text)); | |
element.setAttribute('download', filename); | |
element.style.display = 'none'; | |
document.body.appendChild(element); |
View chromecast-volume.py
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 prun | |
import pychromecast | |
import sys | |
import itertools | |
from typing import List, Dict | |
services, browser = pychromecast.discovery.discover_chromecasts() | |
View workrave-parser.py
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 | |
from typing import Any, Dict, List, Union, Optional, cast | |
import datetime | |
import os.path | |
""" | |
Parse, merge, and output multiple workrave history usages. https://workrave.org/ | |
history file format: |
View sof-audio-setup-carbonx1.sh
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
#!/bin/bash | |
# README You probablyl don't need this script anymore. Please read the comments below to catch up. | |
## Description | |
# Lenovo Carbon X1 Gen 7 - Audio and microphone fix - kernel 5.3+ required. | |
# The script has only been tested for Arch and OpenSuse, | |
# Original thread: https://forums.lenovo.com/t5/Ubuntu/Guide-X1-Carbon-7th-Generation-Ubuntu-compatability/td-p/4489823 | |
# Prereq: Install Linux 5.3 or newer |
View chefBobbyPrices.sh
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
#!/bin/bash | |
# fetch daily signature prices from https://mychefbobby.myshopify.com/ into csv | |
type pup > /dev/null | |
if [ $? != 0 ]; then | |
echo "pup" is required for this script to work | |
exit 1 | |
fi |
View publishAndroid.sh
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
#!/bin/bash | |
# usage: scriptname keystore_path key_alias | |
keystore=$1 | |
alias=$2 | |
version=$(cat config.xml| grep widget | grep -Eo 'version="(.{2,6})"' | grep -Eo '".*"' | sed 's/"//g') | |
app_name=roboscape | |
apk_dir=platforms/android/app/build/outputs/apk/release | |
final_name="$app_name-release-$version.apk" |
View distribute.sh
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
#!/bin/bash | |
# migrates a single file to a proper sub directory. "parallel" safe. | |
# run it in the target directory using parallel: `ls . | parallel PATH_TO_THIS_SCRIPT` | |
fname=$1 | |
# hashes the project name and retuns the first n chars | |
# each char 36 diff values => divides to 16^n sub directories | |
function dirName() |
View wgetVCurl.sh
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
#!/bin/bash | |
filename=abc.tmp | |
url=https://projects.scratch.mit.edu/internalapi/project/99999926/get | |
iters=30 | |
rm $filename > /dev/null 2>&1 | |
echo timing curl for $iters iterations | |
time for iter in `seq 1 $iters`; do |
NewerOlder