This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
███████ ████████ ██████ ██████ █████ ██████ ███████ ██████ ██████ ██ ██ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
███████ ██ ██ ██ ██████ ███████ ██ ███ █████ ██████ ██ ██ ███ | |
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██ | |
███████ ██ ██████ ██ ██ ██ ██ ██████ ███████ ██████ ██████ ██ ██ | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
async function pipe(initial_value, ...funcs) { | |
let current = initial_value; | |
for(let func of funcs) { | |
current = func(current); | |
// If it's thenable, then it's probably a Promise | |
if(typeof current.then == "function") | |
current = await current; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
import XMLWriter from 'xml-writer'; | |
import Rectangle from './Rectangle.mjs'; | |
import Vector2 from './Vector2.mjs'; | |
/* | |
* Simplifies the process for creating an SVG dynamically. | |
* Originally written for MusicBoxConverter, but lifted, reused, and extended for FloatingIslands. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
// Requires Ansi.mjs, which can be found here: https://gist.github.com/8c0bb5e172438b6e62dd48587cfeba84#file-ansi-mjs | |
import a from './Ansi.mjs'; | |
// 1: Setup | |
const settings = { | |
program_name: "", | |
version: "v0.1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
/** | |
* Generates various VT100 ANSI escape sequences. | |
* Ported from C#. | |
* @licence MPL-2.0 <https://www.mozilla.org/en-US/MPL/2.0/> | |
* @source https://gist.github.com/a4edd3204a03f4eedb79785751efb0f3#file-ansi-cs | |
* @author Starbeamrainbowlabs | |
* GitHub: @sbrl | Twitter: @SBRLabs | Reddit: u/Starbeamrainbowlabs | |
***** Changelog ***** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# $Id: xsend.py,v 1.8 2006/10/06 12:30:42 normanr Exp $ | |
# Edited & cleaned up by Starbeamrainbowlabs <[email protected]> | |
import sys | |
import os | |
import time | |
import xmpp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace SBRL; | |
/** | |
* A teeny-tiny templating engine. | |
* @author Starbeamrainbowlabs | |
* @version v0.4 | |
* @lastModified 19th December 2020 | |
* @license https://www.mozilla.org/en-US/MPL/2.0/ Mozilla Public License 2.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
set -o nounset | |
############## | |
# This program converts a plain-text list of urls to the | |
# bookmark-archiver HTML format. | |
# | |
# Requirements: curl, xidel | |
# Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
/** | |
* Parses the source CSV into an array of objects. | |
* @param {string} source The source CSV to parse. | |
* @param {Boolean} [parse_numbers=true] Whether number-like values should be parsed with parseFloat() | |
* @returns {[object]} An array of objects. The keys are taken from the csv header. | |
*/ | |
export default function ParseCSV(source, parse_numbers = true) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// This is a dictionary guaranteed to have only one of each value and key. | |
/// It may be searched either by TFirst or by TSecond, giving a unique answer because it is 1 to 1. | |
/// It implements garbage-collector-friendly IEnumerable. | |
/// </summary> | |
/// <remarks>From https://stackoverflow.com/a/35949314/1460422</remarks> | |
/// <typeparam name="TFirst">The type of the "key"</typeparam> | |
/// <typeparam name="TSecond">The type of the "value"</typeparam> | |
public class BiDictionary<TFirst, TSecond> : IEnumerable<BiDictionary<TFirst, TSecond>.Pair> | |
{ |