Skip to content

Instantly share code, notes, and snippets.

@Rayquaza01
Rayquaza01 / neocities-clean.sh
Created July 16, 2023 21:43
Compares the files from neocities and the files on your local jekyll site, and deletes the residual files from neocities.
#!/bin/bash
# get all files on remote site, remove coloring, and sort
NEOCITIES_FILES=$(neocities list -a | ansi2txt | sort)
# echo "$NEOCITIES_FILES"
# get all files from local site, remove _site/ prefix, remove / suffix, remove blank lines, and sort
LOCAL_FILES=$(find _site/ | sed -e 's/^_site\///' -e 's/\/$//' -e '/^$/d' | sort)
# echo "$LOCAL_FILES"
# compare two lists
// ==UserScript==
// @name Kbin Instance Display
// @namespace Violentmonkey Scripts
// @match https://kbin.social/*
// @grant none
// @version 1.0
// @author Arnaught
// @description Displays instance name next to users on remote instances
// ==/UserScript==
[...document.querySelectorAll(".user-inline")].forEach(item => {
@Rayquaza01
Rayquaza01 / publish-to-toot.user.js
Created November 18, 2022 23:34
Changes the Publish button on Mastodon to Toot
// ==UserScript==
// @name Change Publish to Toot
// @namespace Violentmonkey Scripts
// @match https://mastodon.lol/home
// @grant none
// @version 1.0
// @author Rayquaza01
// @description Changes the Publish button on Mastodon to Toot
// @run-at document-idle
// ==/UserScript==
@Rayquaza01
Rayquaza01 / pico-mbine.py
Last active July 26, 2020 17:17
pico-mbine - A python script to split / combine pico-8 files for easy editing
#!/usr/bin/env python3
# pico-mbine 2020.07.26
# by Joe Jarvis
# Separate .p8 files for easy external editing
# Combine them again to run in pico-8
# Usage:
# ./pico-mbine.py export {file}
@Rayquaza01
Rayquaza01 / index.html
Last active November 23, 2019 05:04
This page intentionally left blank.
<!DOCTYPE html>
<!-- This is an intentionally blank page. -->
<html>
<head>
<meta charset="utf-8">
<title>This page intentionally left blank.</title>
<style>
body, html {
background-color: #1C1C1C;
color: #D0D0D0;
@Rayquaza01
Rayquaza01 / GoogleAuthenticatorImport.py
Created April 9, 2018 22:45
Python script to convert Google Authenticator database to a format the Authenticator extension can read
#!/usr/bin/env python3
import sqlite3
import json
conn = sqlite3.connect("databases")
c = conn.cursor()
c.execute("SELECT * FROM accounts")
obj = {"otp_list": []}
for row in c.fetchall():
obj["otp_list"].append({
"name": row[1],
@Rayquaza01
Rayquaza01 / BingWallpaperUpdater.pyw
Last active December 2, 2017 19:18
Changes the wallpaper to the daily wallpaper provided by Bing. Only works on 64bit Windows
#!/usr/bin/env python3
import ctypes
import urllib.request
import json
import os
saveto = os.path.dirname(__file__) + '\\wall.jpg'
imagejson = urllib.request.urlopen('http://www.bing.com/HPImageArchive.aspx'
'?format=js&idx=0&n=1&mkt=en-US').read()
data = json.loads(imagejson.decode('utf-8'))
url = data['images'][0]['url']