aly / offline-check/maintenance mode
0 likes
0 forks
4 files
Last active
a script to touch/rm a file based on ping result, and an nginx conf
| 1 | #!/bin/bash |
| 2 | # offline-check [ip number of host] |
| 3 | # e.g `offline-check 2` generates /var/www/html/offline.check.2 |
| 4 | # example crontab: * * * * * $HOME/.local/bin/offline-check |
| 5 | ping -w1 -c1 10.8.0.$1 | grep "64 bytes from" 2>&1 >/dev/null && rm -f /var/www/html/offline.check.$1 2>/dev/null || touch /var/www/html/offline.check.$1 |
aly / fedipost.py
0 likes
0 forks
1 files
Last active
a script to forward fediverse posts from a jsonfeed url to a discord webhook, optionally filtering by keyword/hashtag
| 1 | #!/usr/bin/env python3 |
| 2 | # usage: fedipost.py jsonfeed_url webhook_url [filter_text] |
| 3 | # e.g: fedipost.py https://blahaj.zone/@alypet.json webhook #alyblog |
| 4 | from markdownify import markdownify |
| 5 | from requests import get,post |
| 6 | import os, sys |
| 7 | |
| 8 | WH = sys.argv[2] |
| 9 | |
| 10 | try: |
aly / _firstboot.js
0 likes
0 forks
12 files
Last active
My bitburner scripts. adapted from alain mostly
| 1 | /** @param {NS} ns */ |
| 2 | // script to be run after each augment to recover hack level and money |
| 3 | // 1. run scan.js, backdoor n00dles and foodnstuff using the links provided |
| 4 | // 2. run this script, starts hacking those servers |
| 5 | // 3. once you have 200k, go to aevum, then run alain/casino.js |
| 6 | // 3a. go to tech store, buy darkweb, connect darkweb, buy -a |
| 7 | // 4. run scan.js, nuke and backdoor all available servers |
| 8 | // 5. run purchase.js, update with higher ram allowance (32>2048) if you have enough money |
| 9 | // * run delete-pserv.js if there's an issue with buying the servers |
| 10 | // 6. run init.js, this will boot up stockmaster and stats, as well as starting the hack scripts running across all pservs and home |
aly / ssh-setup.sh
0 likes
0 forks
1 files
Last active
A script to pull .ssh authorized_keys and config from a repository and update the current user's .ssh with them.
| 1 | #!/bin/bash -x |
| 2 | # curl s.aly.pet/ssh-setup | GIT_HOSTNAME=dotfiles.example.com GIT_USERNAME=you GIT_PASSWORD=password bash -x |
| 3 | if [ -z $GIT_HOSTNAME ]; then |
| 4 | echo -n "Git hostname: " |
| 5 | read -s GIT_HOSTNAME |
| 6 | fi |
| 7 | if [ -z $GIT_USERNAME ]; then |
| 8 | echo -n "Git username: " |
| 9 | read -s GIT_USERNAME |
| 10 | fi |
aly / plexbrowse.py
0 likes
0 forks
1 files
Last active
a script to get direct download urls from a plex host. pass numbers as arguments to preselect choices instead of entering when prompted
| 1 | #!/usr/bin/env python3 |
| 2 | import requests |
| 3 | from sys import stderr, stdout, argv |
| 4 | from os import environ |
| 5 | from os.path import basename |
| 6 | |
| 7 | host = environ.get("PLEX_HOST", "localhost") |
| 8 | token = environ.get("PLEX_TOKEN", "") |
| 9 | |
| 10 | args = argv[1:] |