Skip to content

Instantly share code, notes, and snippets.

View ktwrd's full-sized avatar

kate ktwrd

View GitHub Profile
[
{
"id":"8dd95206-2b2f-482e-a729-328c650f9fde",
"version":"1.9.0.0",
"type":"InternalApp"
},
{
"id": "9f729e5e-07c5-45bb-98f4-f5a0612846d3",
"display_name": "Open Fortress",
"type": "Kachemak",
@ktwrd
ktwrd / self-signed.conf
Last active March 21, 2024 03:55
Xenia Dashboard NGINX Config
ssl_certificate /etc/ssl/certs/nginx-selfsigned.crt;
ssl_certificate_key /etc/ssl/private/nginx-selfsigned.key;
@ktwrd
ktwrd / adastral_install.desktop
Created December 30, 2023 04:46
Adastral Installer
#!/usr/bin/env xdg-open
[Desktop Entry]
Name=Install Adastral
Exec=sh -c 'curl -L -O --output-dir /tmp/ https://gk.kate.pet/adastral-install.sh 2> /dev/null && bash /tmp/adastral-install.sh'
Icon=steamdeck-gaming-return
Terminal=true
Type=Application
StartupNotify=false
@ktwrd
ktwrd / jetbrains-install.sh
Created August 8, 2023 07:44
Install Jetbrains Toolbox (Linux)
#!/bin/bash
if [[ ! -f ~/.local/share/JetBrains/Toolbox/bin/jetbrains-toolbox ]]; then
printf "Installing"
URL=$(curl -s 'https://data.services.jetbrains.com//products/releases?code=TBA&latest=true&type=release' | jq -r '.TBA[0].downloads.linux.link')
DOWNLOAD_TEMP_DIR=$(mktemp -d)
mkdir -p "${DOWNLOAD_TEMP_DIR}"
@ktwrd
ktwrd / Mp3Convert.ps1
Created July 13, 2023 10:20
Convert FLAC to MP3 Recursively
param(
# Directory to start the scan at
[string]
$Directory,
# When enabled, it will delete the flac file after converted to mp3
[bool]
$DeleteOldFile=$False
)
# Convert specified file into a mp3 (will only work for .flac files)
@ktwrd
ktwrd / PleromaBulkUpload.ps1
Created July 5, 2023 03:48
Pleroma Emoji Bulk Upload
<#
.Synopsis
Upload individual file or an entire directory to an emoji pack on your Pleroma-based instance.
.Example
Upload an entire directory to an emoji pack
.\PleromaBulkUpload.ps1 -Website "xenia.social" -ApiKey "xxxxx" -EmojiPackName skype -UploadDirectory $True -UploadDirectoryTarget .\skype
Upload one file to an emoji pack
.\PleromaBulkUpload.ps1 -Website "xenia.social" -ApiKey "xxxxx" -EmojiPackName skype -Filename apple.gif
#>
@ktwrd
ktwrd / Extract-Executable-Icon.ps1
Last active July 5, 2023 03:32
Extract ICO from Exe File
param(
[string]
$Path
)
#Adopted from https://gist.github.com/darkfall/1656050
$TypeDefinition = @'
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
@ktwrd
ktwrd / README.md
Last active July 6, 2023 06:10
Custom Revolt Theme

To install, copy the content of theme.json and then click the upload icon under Settings->Appearance->Theme Overrides.

image

If you would like to generate the theme yourself and insert it into an existing theme override. Use my Revolt Theme Tool

Preview

image

@ktwrd
ktwrd / backup-database.sh
Created December 19, 2022 05:33
Backup PostgreSQL database running with Docker
#!/bin/bash
TIMESTAMP=$(date +"%Y%m%d_%H%M%s")
FILENAME="/var/lib/postgresql/data-backup/$TIMESTAMP.bak"
_ROLE="postgres"
_ENCODING="UTF8"
_DBNAME="mastodon"
docker exec -it mastodon_db_1 \
pg_dump --username "postgres" \
--no-password \
--file "$FILENAME" \
@ktwrd
ktwrd / script.js
Created October 8, 2022 05:28
Fetch Support Downloads for unlisted Acer Products
/*
Requirements
- node.js >16
- axios
- fast-xml-parser
*/
// Acer Predator PH315-52
const targetProductId = '7983'