poetry install
Make sure ffmpeg is available
#!/usr/bin/env pip-run | |
# /// script | |
# dependencies = [ | |
# 'feedparser', | |
# 'readability-lxml', | |
# 'lxml_html_clean', | |
# 'requests', | |
# ] | |
# /// |
#!/bin/env python | |
""" | |
Hi! Running this script will copy to your clipboard the artist and title of the | |
currently played Spotify track. It will be copied in the format of `{artist} - {title}`. | |
Requires Termux:Widget and Termux:API, and you'll need to enable notification | |
access for Termux (you'll be prompted to). | |
This is intended to be run through a widget. Put this script under | |
~/.shortcuts/tasks so it will not open an annoying ass terminal when launched, |
# pylint: disable=line-too-long | |
""" | |
https://kevincox.ca/2020/09/09/terraform-debug/ | |
""" | |
import ast | |
import os | |
import json | |
from pathlib import Path | |
from subprocess import PIPE, STDOUT, Popen | |
from tempfile import mkstemp |
#!/bin/env python3 | |
# pylint: disable=line-too-long | |
""" | |
Demucsim - די מקסים | |
A wrapper around demucs[1], an music separation tool; it can separate drums, | |
vocals, and bass (these are all called stems) from a given audio track. | |
The only problem with Demucs is its insufficient CLI: | |
1. Most of the time, I want only a small section of the track, so I don't want |
""" | |
Requires: requests, beautifulsoup4 | |
TODO: | |
- Logging | |
- Document :) | |
""" | |
import pickle | |
from itertools import count, islice | |
from pathlib import Path |
""" | |
Finishing writing this script, I found out that Yad2 has aggressive | |
bot-checking settings, so this script is practically unusable as a background | |
scraper checking for new apartments, unless you're changing the headers every 2 | |
minutes manually. | |
It was fun writing it, at least | |
Requires: requests, beautifulsoup4 | |
""" | |
import csv |
#!/bin/env python | |
import webbrowser | |
from argparse import ArgumentParser | |
from typing import List | |
URL = str | |
LOCATIONS = [ | |
"afghanistan", | |
"algeria", |
#!/bin/env python3 | |
""" | |
Get alerts on new available slots for passport renewal. | |
Should be run via Termux on your Android phone prolly | |
You'll need to place a JWT token in a file named `jwt` in the script directory. | |
Login to myvisit.com, then try querying for dates and copy the cookies header | |
from the SearchAvailableSlots request. | |
Also you'll need a triumphant ringtone to be played when a match is found! Name |
#!/usr/bin/env fish | |
set affected (git status --porcelain | cut -d' ' -f 3 | awk -F'/' '{print $NF}' | string join ", ") | |
# --all stages all changes to already-tracked files | |
git commit --all -m $affected | |
git push |