Skip to content

Instantly share code, notes, and snippets.

View GeonoTRON2000's full-sized avatar

GeonoTRON2000 GeonoTRON2000

View GitHub Profile
@GeonoTRON2000
GeonoTRON2000 / crypto.sh
Created January 7, 2023 12:03
Encrypt and decrypt files using GitHub SSH keys (RSA)
#!/bin/bash -e
# Encrypt: ./crypto.sh github_username <message.txt
# Decrypt: ./crypto.sh <encrypted.txt
if [[ -n "$1" ]]; then
curl -sf "https://github.com/$1.keys" >/tmp/pubkey.pub
ssh-keygen -f /tmp/pubkey.pub -e -m PKCS8 >/tmp/pubkey.pem.pub
openssl rsautl -encrypt -pubin -inkey /tmp/pubkey.pem.pub | openssl base64 -e
rm /tmp/pubkey.pub /tmp/pubkey.pem.pub
else
@GeonoTRON2000
GeonoTRON2000 / Pingu.css
Created October 25, 2020 03:37
Pingu: A theme for FluxBB similar to the Scratch 1.4-era forum feel, but in an icy color scheme and stylized for the Antarctic.
/*****************************************************************
1. INITIAL SETTINGS
*****************************************************************/
div.postsignature{
max-height: 130px;
}
p.modlist {
display: none;
}
@GeonoTRON2000
GeonoTRON2000 / ScratchStyle.css
Created October 25, 2020 03:14
Modern FluxBB style to give the original feel of the 1.4-era Scratch Forums.
/*****************************************************************
1. INITIAL SETTINGS
*****************************************************************/
div.postsignature{
max-height: 130px;
}
p.modlist {
display: none;
}
@GeonoTRON2000
GeonoTRON2000 / fishmarket.user.js
Created July 31, 2017 03:37
Exchange fish (the currency) for goods on any forum site using BBCode tags.
// This is a placeholder in order to generate the gist URL.
@GeonoTRON2000
GeonoTRON2000 / externaltbgblocks.js
Last active July 29, 2017 07:50
A jokey Scratchblocks imitation for the TBG forums
/*
TBG Blocks Plugin
Author: GeonoTRON2000
Version: 1.0
This versions is for being imported across domains.
*/
TBGBlocks = {
parse: function(settings) {
@GeonoTRON2000
GeonoTRON2000 / buynow.js
Created July 29, 2017 07:32
A plugin to allow users to insert functional "Buy Now" buttons into a forum using Cash Mod.
var me = document.getElementById("brdwelcome").getElementsByTagName("strong")[0].innerHTML;
var j;
var posts = document.getElementsByClassName("postmsg");
for (j = 0; j < posts.length; j++) {
var post = posts[j];
var thishtml = post.innerHTML;
var buttons = [];
var i;
for (i = 0; i < thishtml.split("[buynow]").length-1; i++) {
buttons[i] = thishtml.split("[buynow]")[i+1].split("[/buynow]")[0];
@GeonoTRON2000
GeonoTRON2000 / flash.js
Created July 29, 2017 07:26
Parse a [flash] BBCode
// Usage: [flash=width,height]swf_url[/flash]
var body = document.getElementsByTagName("body")[0];
body.innerHTML = body.innerHTML.replace(/\[flash=([0-9]+),([0-9]+)\]((mailto\:|(news|(ht|f)tp(s?))\:\/\/){1}\S+)\[\/flash\]/gi, '<object type="application/x-shockwave-flash" data="$3" width="$1" height="$2"><embed type="application/x-shockwave-flash" width="$1" height="$2" src="$3" /></object>');
@GeonoTRON2000
GeonoTRON2000 / scratchproj3.js
Created July 29, 2017 07:23
Allow a Scratch 2.x project to be embedded in BBcode
// Usage: [scratch]projectID[/scratch]
var posts = document.getElementsByClassName("postmsg");
var pattern = /\[scratch\]([0-9]+)\[\/scratch\]/gi;
for (var i = 0; i < posts.length; i++) {
var post = posts[i];
post.innerHTML = post.innerHTML.replace(pattern, "<iframe allowtransparency=\"true\" width=\"485\" height=\"402\" src=\"http://scratch.mit.edu/projects/embed/$1/\" frameborder=\"0\" allowfullscreen></iframe>");
}
@GeonoTRON2000
GeonoTRON2000 / scratchproj2.js
Last active July 29, 2017 07:23
Allow Scratch 1.4 projects to be embedded in BBcode
// Usage: [scratch=flash|java]author/projectID[/scratch]
var j;
var posts = document.getElementsByClassName("postmsg");
for (j = 0; j < posts.length; j++) {
var post = posts[j];
if (post.parentElement.parentElement.parentElement.parentElement.className == "blockpost rowodd firstpost") {
var thishtml = post.innerHTML;
var javas = [];
var i;
@GeonoTRON2000
GeonoTRON2000 / youtube.js
Created July 29, 2017 07:17
Parse a [youtube]videoID[/youtube] or [youtube]videoURL[/youtube] BBCode tag
var posts = document.getElementsByClassName("postmsg");
// don't allow videos in signatures
var j;
for (j = 0; j < posts.length; j++) {
var thishtml = posts[i].innerHTML;
var i;
var vids = [];
for (i = 0; i < thishtml.split("[youtube]").length-1; i++) {