aly / digitalocean-torrentdl.sh
0 likes
0 forks
1 files
Last active
Provisions a droplet on DigitalOcean to download a given torrent file, then reupload to a given rclone remote
| 1 | #!/bin/bash |
| 2 | # Provisions a droplet on DigitalOcean to download a given torrent file, then reupload to a given rclone remote |
| 3 | # Prints estimated USD cost of transaction when complete |
| 4 | # uses your user's rclone.conf, so set up the remote locally and make sure it works |
| 5 | # torrentdl.sh https://releases.ubuntu.com/20.04/ubuntu-20.04.1-live-server-amd64.iso.torrent b2:my-linux-isos/ubuntu/ |
| 6 | echo "Checking dependencies (wget, installed doctl, configured rclone)" |
| 7 | [ -s "$HOME/.config/rclone/rclone.conf" ] || (echo "Set up rclone (from rclone.org, not from package manager) with a remote, or write to ~/.config/rclone/rclone.conf, then run this script again"; exit) |
| 8 | |
| 9 | if type doctl >/dev/null 2>&1; then |
| 10 | if ! doctl compute droplet list >/dev/null 2>&1; then |
aly / videolp.py
0 likes
0 forks
1 files
Last active
A script I made a long time ago, generates a video for a music file using cover art if available and including track information
| 1 | #!/usr/bin/env python3 |
| 2 | # A script to generate videos for MP3s |
| 3 | from moviepy.editor import * |
| 4 | import numpy as np |
| 5 | from PIL import Image |
| 6 | from glob import glob |
| 7 | from mutagen.mp3 import MP3 |
| 8 | from io import BytesIO |
| 9 | |
| 10 | #points |
aly / mega-droplet.json
0 likes
0 forks
1 files
Last active
A Packer build file that produces an ubuntu 20.04 droplet with megacmd and rclone set up
| 1 | { |
| 2 | "variables": { |
| 3 | "MEGA_EMAIL": "{{env `MEGA_EMAIL`}}", |
| 4 | "MEGA_PASSW": "{{env `MEGA_PASSW`}}", |
| 5 | "MEGA_ENC_PASSW": "{{env `MEGA_ENC_PASSW`}}" |
| 6 | }, |
| 7 | "builders": [ |
| 8 | { |
| 9 | "type": "digitalocean", |
| 10 | "image": "ubuntu-20-04-x64", |
aly / emojimashup.json
0 likes
0 forks
1 files
Last active
a list containing twitter image urls and description of contents. from @emojimashupbot
| 1 | [ |
| 2 | [ |
| 3 | "EnM5k0mWMAM624F", |
| 4 | "\ud83d\ude44 rolling-eyes + \ud83d\ude0d hearts-eyes" |
| 5 | ], |
| 6 | [ |
| 7 | "EnMr17sXEAwaQL8", |
| 8 | "\ud83d\ude08 demon-smiling + \ud83c\udf1d full-moon + \ud83d\udd76\ufe0f sunglasses" |
| 9 | ], |
| 10 | [ |
aly / qlocktwo.py
0 likes
0 forks
1 files
Last active
a rough python mockup implementation of the qlocktwo clock
| 1 | from datetime import datetime |
| 2 | from textwrap import wrap |
| 3 | |
| 4 | hour = ["twelve", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven"] |
| 5 | letters = "ITLISASAMPMACQUARTERDCTWENTYFIVEXHALFSTENFTOPASTERUNINEONESIXTHREEFOURFIVETWOEIGHTELEVENSEVENTWELVETENSEOCLOCK" # 110 letters |
| 6 | |
| 7 | def get_led_matrix(): |
| 8 | out = "0" * len(letters) |
| 9 | time = get_time_in_words() |
| 10 | for word in time.split(): |
aly / lawtechie-story-links.py
0 likes
0 forks
1 files
Last active
A script to parse lawtechie's post history and show, for each story that is linked to in another story, which stories link to it. Used for collecting multiple parts together. Does not show story singletons. More parsing work to do in the future
| 1 | #!/usr/bin/env python3 |
| 2 | from requests import get |
| 3 | from json import load,dump,dumps |
| 4 | from collections import defaultdict |
| 5 | from markdown import markdown |
| 6 | from lxml import etree |
| 7 | from time import sleep |
| 8 | |
| 9 | html = False |
| 10 | url = "https://www.reddit.com/search.json" |