aly / vultrwin.sh
0 likes
0 forks
2 files
Last active
A windows startup cmd script, and bash script to execute it on vultr. installs all the things i think are useful to have on a new windows server
| 1 | #!/bin/bash |
| 2 | domain="alyssasmith.id.au" |
| 3 | if [ -z "$1" ]; then |
| 4 | region="syd" |
| 5 | else |
| 6 | region="$1" |
| 7 | fi |
| 8 | if [ -z "$2" ]; then |
| 9 | size="vc2-4c-8gb" |
| 10 | else |
aly / win-remote-ssh.ps1
0 likes
0 forks
1 files
Last active
A script that should configure a given windows machine to have openssh running at least. opens vim to paste in authorized keys, installs scoop as well
| 1 | Set-ExecutionPolicy RemoteSigned |
| 2 | New-Item -path $profile -type file -force |
| 3 | Add-Content -path $profile -value '[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"' |
| 4 | & $profile |
| 5 | iwr -useb get.scoop.sh | iex |
| 6 | scoop install git |
| 7 | scoop update |
| 8 | iwr https://github.com/PowerShell/Win32-OpenSSH/releases/download/v8.1.0.0p1-Beta/OpenSSH-Win64.zip -outfile "C:\Program Files\OpenSSH-Win64.zip" |
| 9 | expand-archive -path "C:\Program Files\OpenSSH-Win64.zip" -destinationpath "C:\Program Files" |
| 10 | move-item "C:\Program Files\OpenSSH-Win64" "C:\Program Files\OpenSSH" |
aly / plexbrowse.py
0 likes
0 forks
1 files
Last active
A script to let you play things from a given plex host using a token from your environment
| 1 | #!/usr/bin/env python3 |
| 2 | # python3 plexbrowse.py | while read p; do mpv "$p"; done |
| 3 | # use --host to set the hostname of the server to access |
| 4 | # set PLEX_TOKEN in your environment with your X-Plex-Token |
| 5 | import requests |
| 6 | from os import environ |
| 7 | from os.path import basename |
| 8 | import xml.etree.ElementTree as ET |
| 9 | from sys import stderr |
aly / afterpay-fetch-data.py
0 likes
0 forks
1 files
Last active
A script to download afterpay payment due information and save to afterpay-due.json
| 1 | from selenium import webdriver |
| 2 | from selenium.webdriver.common.by import By |
| 3 | from selenium.webdriver.support.ui import WebDriverWait |
| 4 | from selenium.webdriver.support import expected_conditions as EC |
| 5 | from subprocess import Popen, PIPE |
| 6 | from os import environ |
| 7 | |
| 8 | try: |
| 9 | driver = webdriver.Chrome(environ.get("CHROMEDRIVER_PATH", "chromedriver.exe")) |
| 10 | driver.get("https://portal.afterpay.com/au/login-email") |
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 | |
| 7 | # Default values |
| 8 | IMAGE="ubuntu-20-04-x64" |
| 9 | REGION="sgp1" # overridden by ping check |
| 10 | HOSTNAME="torrent-dl" |
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", |