Skip to content

Instantly share code, notes, and snippets.

Avatar
💕

Erisa A Erisa

💕
View GitHub Profile
@Erisa
Erisa / create-cloud-template.sh
Created April 20, 2023 22:52 — forked from meramsey/create-cloud-template.sh
This script will download a cloud image of many Linux distros and create a Proxmox 6 KVM template from it.
View create-cloud-template.sh
#!/bin/bash
set -o errexit
clear
printf "\n*** This script will download a cloud image and create a Proxmox VM template from it. ***\n\n"
### HOW TO USE
### Pre-req:
### - run on a Proxmox 6 server
### - a dhcp server should be active on vmbr1
@Erisa
Erisa / repeat.ts
Last active May 15, 2023 14:45
tunnel status cf alert with https://repeat.dev
View repeat.ts
const tunnelStatusTypes = {
TUNNEL_STATUS_TYPE_INVALID: {
color: 3553599,
name: 'Invalid',
},
TUNNEL_STATUS_TYPE_INACTIVE: {
color: 3553599,
name: 'Inactive',
},
TUNNEL_STATUS_TYPE_DOWN: {
@Erisa
Erisa / repeat.ts
Last active January 7, 2023 17:48
Repeat for clearing out Pages deployments (https://repeat.dev)
View repeat.ts
const config = [
{
project: "erisa",
days: 180
},
{
project: "super-secret-sauce",
days: 60
}
]
@Erisa
Erisa / fly.toml
Created October 10, 2022 22:58
thelounge on fly
View fly.toml
# fly.toml file generated for lounge on 2022-10-10T20:05:47+01:00
app = "lounge"
kill_signal = "SIGINT"
kill_timeout = 5
processes = []
[deploy]
strategy = "rolling"
@Erisa
Erisa / as-ire.js
Created July 3, 2022 12:51
Cloudflare Worker serving https://asi.re modifications
View as-ire.js
addEventListener("fetch", event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
let url = new URL(request.url)
url.hostname = "erisa.uk"
@Erisa
Erisa / updown-proxy.js
Created April 25, 2021 16:39
updown.io status page proxy for cf workers
View updown-proxy.js
addEventListener('fetch', event => {
event.respondWith(handleRequest(event.request))
})
async function handleRequest(request) {
var whitelist = [
"/rik1",
// etc
]
@Erisa
Erisa / seafile_trash.rb
Last active March 22, 2021 01:54
Restore everything from trash in seafile
View seafile_trash.rb
# frozen_string_literal: true
require 'json'
require 'net/http'
libs = [
"aa3ffa6f-61d3-4cda-bf7d-89a856068fc3",
"563aa837-4865-4e4e-b0aa-6333c2634c64",
"385275da-c656-4f2f-918a-d4190828ae20",
'c50d9d60-5478-4c27-89d5-b3c6d1708438',
@Erisa
Erisa / hlg.cr
Created November 11, 2020 17:01
Hard Link Generator
View hlg.cr
#!/bin/env -S crystal build
# Hard Link Generator
# Generates hard links for all files in a given folder,
# while also finding and replacing strings in the filenames.
#
# The folder is created for you, but existing files (Running it twice?) will cause errors.
#
# Usage:
@Erisa
Erisa / tunnel.cr
Last active December 24, 2020 02:08
A small wrapper around Cloudflared that creates a tunnel based on the given local and remote(optional) endpoints.
View tunnel.cr
###########################################################################
# A small wrapper around Cloudflared that creates #
# a tunnel based on the given local and remote(optional) endpoints. #
# License: https://unlicense.org/ #
###########################################################################
## Config
# Under Windows+WSL you'll want to use .exe here.
# Since that's what I use personally it's the default.
@Erisa
Erisa / cfd-termux.sh
Last active March 3, 2023 17:50
Install the Cloudflare Daemon (cloudflared) in Termux
View cfd-termux.sh
#!/bin/sh
echo 'NOTE: You can now install cloudflared directly from Termux repos.'
echo 'NOTE: To install it from source instead, open the script and comment out the next two lines.'
pkg install cloudflared
exit
# ^ comment out these lines to proceed with the script
echo "--upgrading packages"
yes "" | pkg update