Skip to content

Instantly share code, notes, and snippets.

@TheBlackParrot
TheBlackParrot / install.sh
Last active December 21, 2020 21:47
Brickadia Proton scripts
#!/bin/sh
# THIS REQUIRES SOME EDITING RIGHT NOW, SORRY!
# Wine prefix directory
WINDOWS_FOLDER=$HOME/Games/Brickadia
# URL to Launcher
LAUNCHER_DOWNLOAD_URL="https://static.brickadia.com/launcher/1.4/BrickadiaInstaller.exe"
# Directory containing proton
// http://forum.blockland.us/index.php?topic=276074.0
function loadEnvironment(%file)
{
%res = GameModeGuiServer::parseGameModeFile(%file, 1);
EnvGuiServer::getIdxFromFilenames();
EnvGuiServer::setSimpleMode();
if (!$EnvGuiServer::SimpleMode)
@TheBlackParrot
TheBlackParrot / runblsrv.sh
Last active October 10, 2018 06:13
Blockland dedicated server launcher script
#!/bin/sh
NO_SCREEN=false
ATTACH=false
GAMEMODE="Custom"
export WINEDLLOVERRIDES="mscoree=d;mshtml=d;$WINEDLLOVERRIDES"
DEDICATED_MODE="-dedicated"
BLOCKLAND_FILES_FILENAME="BLr1988-server.zip"
BLOCKLAND_FILES_URL="https://birb.zone/files/$BLOCKLAND_FILES_FILENAME"
@TheBlackParrot
TheBlackParrot / fa-unwatcher.js
Created September 26, 2018 05:48
Unwatches everyone on FurAffinity's "Manage my Watches" page
var script = document.createElement("script");
script.setAttribute("src", "https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
document.body.appendChild(script);
var links = $('.flex-item-watchlist-controls a[href^="/unwatch/"]');
for(let idx in links) {
let link = links[idx];
@TheBlackParrot
TheBlackParrot / main.js
Created February 3, 2018 06:01
Discord rich presence for Foobar2000
/* you need discord-rpc and a discord application in your dev page for this to work */
/* uses the Now Playing Simple plugin in foobar */
/* settings.json:
{
"client_id": "[bot client id]",
"nowplaying_file": "D:/foobar.nowplaying.txt"
}
*/
@TheBlackParrot
TheBlackParrot / basic-music-bot.js
Last active February 3, 2017 07:05
Basic music bot for Discord
// I apologize in advance for the unreadable code. :(
// --
// -- REVISION 3
// -- February 3rd, 2017 01:04 CST
// --
const Discord = require('discord.js');
const DiscordClient = new Discord.Client();
const fs = require('fs');
@TheBlackParrot
TheBlackParrot / _3x4_nums.py
Last active December 1, 2018 04:36
Control things/see system stats with a Launchpad (uses launchpad.py)
class Txfnums():
def __init__(self):
self.nums = [
[
0, 1, 0,
1, 0, 1,
1, 0, 1,
0, 1, 0
],
@TheBlackParrot
TheBlackParrot / main.py
Created December 6, 2016 06:43
Wallpaper randomizer for wpgtk
#!/usr/bin/python
import subprocess
import os
import random
valid_extensions = [".jpg", ".png"]
wallpapers = []
output = subprocess.run("wpg -l".split(" "), stdout=subprocess.PIPE).stdout.decode("UTF-8")
@TheBlackParrot
TheBlackParrot / scrabble-sort.py
Created December 3, 2016 12:02
sort a text file's words by value in Scrabble
#!/usr/bin/python
import sys;
points = {};
for char in "eaionrtlsu":
points[char] = 1;
for char in "dg":
points[char] = 2;
@TheBlackParrot
TheBlackParrot / mpd-diff.py
Created August 17, 2016 09:21
(MPD/Mopidy) Adds tracks to the playlist newly added to the library
#!/usr/bin/python
import os;
import pickle;
from subprocess import check_output;
from subprocess import Popen;
from mpd import MPDClient;
run_dir = os.environ.get("XDG_RUNTIME_DIR");