Skip to content

Instantly share code, notes, and snippets.

View alyssadev's full-sized avatar

Aly Smith alyssadev

View GitHub Profile
#!/bin/bash
# mkdist.sh
apt update; apt install -y jq libfuse2 wget file
wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod +x *.AppImage
mkdir discord
cd discord
wget https://discord.com/api/download\?platform\=linux\&format\=tar.gz
mv * discord.tar.gz
tar -xf discord.tar.gz

Keybase proof

I hereby claim:

  • I am alyssadev on github.
  • I am alyssile (https://keybase.io/alyssile) on keybase.
  • I have a public key whose fingerprint is 4304 1865 9397 3CC0 FBF0 A109 F4D2 C7A4 26DD A1BD

To claim this, I am signing this object:

@alyssadev
alyssadev / fedipost.py
Last active October 24, 2023 03:23
a script to forward fediverse posts from a jsonfeed url to a discord webhook, optionally filtering by keyword/hashtag
#!/usr/bin/env python3
# usage: fedipost.py jsonfeed_url webhook_url [filter_text]
# e.g: fedipost.py https://blahaj.zone/@alypet.json webhook #alyblog
from markdownify import markdownify
from requests import get,post
import os, sys
WH = sys.argv[2]
try:
@alyssadev
alyssadev / _firstboot.js
Last active October 17, 2023 16:13
My bitburner scripts. adapted from alain mostly
/** @param {NS} ns */
// script to be run after each augment to recover hack level and money
// 1. run scan.js, backdoor n00dles and foodnstuff using the links provided
// 2. run this script, starts hacking those servers
// 3. once you have 200k, go to aevum, then run alain/casino.js
// 3a. go to tech store, buy darkweb, connect darkweb, buy -a
// 4. run scan.js, nuke and backdoor all available servers
// 5. run purchase.js, update with higher ram allowance (32>2048) if you have enough money
// * run delete-pserv.js if there's an issue with buying the servers
// 6. run init.js, this will boot up stockmaster and stats, as well as starting the hack scripts running across all pservs and home
@alyssadev
alyssadev / ssh-setup.sh
Last active September 27, 2023 08:00
A script to pull .ssh authorized_keys and config from a repository and update the current user's .ssh with them.
#!/bin/bash -x
# curl s.aly.pet/ssh-setup | GIT_HOSTNAME=dotfiles.example.com GIT_USERNAME=you GIT_PASSWORD=password bash -x
if [ -z $GIT_HOSTNAME ]; then
echo -n "Git hostname: "
read -s GIT_HOSTNAME
fi
if [ -z $GIT_USERNAME ]; then
echo -n "Git username: "
read -s GIT_USERNAME
fi
@alyssadev
alyssadev / configuration.yml
Last active December 31, 2023 17:03
My Authelia setup https://auth.aly.pet
# authelia/config/configuration.yml
# run `openssl rand -hex 20` three times and update `jwt_secret`, `session.secret` and `storage.encryption_key`
server:
host: 0.0.0.0
port: 9091
log:
level: info
jwt_secret: TODO
default_redirection_url: https://auth.example.com
totp:
#!/usr/bin/env python3
import requests
from datetime import datetime, timedelta
with open(".bottoken") as f:
token = f.read().strip()
t = '\u2705'
f = '\u274c'
class Channel:
@alyssadev
alyssadev / aoc1.py
Created December 1, 2022 13:24
aoc 2022
with open("aoc1.txt") as f:
data = f.read().strip()
elves = [list(map(int,_.split("\n"))) for _ in data.split("\n\n")]
ans1 = max(sum(_) for _ in elves)
ans2 = sum(sorted(sum(_) for _ in elves)[-3:])
print(ans1,ans2)
@alyssadev
alyssadev / nbl_dl.py
Created March 29, 2022 06:29
A script to download game vods, condensed vods, or highlights from nbl.com.au without an account
#!/usr/bin/env python3
from requests import get, post
from subprocess import Popen
from os import remove
from datetime import datetime
class Category:
HIGHLIGHTS = 71361
CONDENSED = 71377
FULL = 71385
@alyssadev
alyssadev / plexbrowse.py
Last active February 15, 2022 06:16
a script to get direct download urls from a plex host. pass numbers as arguments to preselect choices instead of entering when prompted
#!/usr/bin/env python3
import requests
from sys import stderr, stdout, argv
from os import environ
from os.path import basename
host = environ.get("PLEX_HOST", "localhost")
token = environ.get("PLEX_TOKEN", "")
args = argv[1:]