Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name generals.io mini-tournaments
// @namespace http://generals.io/profiles/person2597
// @version 0.1.1
// @description minitournament helper for generals.io
// @author person2597
// @match https://brackethq.com/b/*
// @icon https://www.google.com/s2/favicons?domain=brackethq.com
// @grant GM.xmlHttpRequest
// ==/UserScript==
@Allen-B1
Allen-B1 / dict.fish
Last active August 26, 2020 21:33
Fish: dictionaries / associative arrays / maps
function dict
set arg_dict (echo $argv[2] | string replace -ar "[^A-Za-z0-9]+" "_")
set arg_key (echo $argv[3] | string replace -ar "[^A-Za-z0-9]+" "_")
switch $argv[1]
case "set"
if test (count $argv) -gt 3
set -g $arg_dict'_'$arg_key $argv[4..-1]
else
set -g $arg_dict'_'$arg_key
const DEBUG = true;
const APP_FORM_URL = "";
const ELECTION_FORM_URL = "";
const SHEET_URL = "";
const WEBHOOK_URL = "https://discordapp.com/api/webhooks/.../";
const ROLE = "";
const ELECTION_NAME = "2020 Computer Elections";
@Allen-B1
Allen-B1 / Birthday.txt
Last active February 8, 2019 18:35
Music on Arduino
8.C. 16C | D C F | 2E 8.C. 16C | D C G | 2F 8.C. 16C | C5 A F | E 2D 8.Bb. 16Bb | A F G | 3F
@Allen-B1
Allen-B1 / colorizer.html
Created January 11, 2019 01:51
Colorize text
<html>
<head><title>Colorizer</title></head>
<body>
<input type="text" id="input">
<div id="out"></div>
<script>
rc = () => "#" + (Math.random()).toString(16).slice(-6)
function color(text) {
var out = ""
isprime:
push eax
mov ecx, eax
sub ecx, 1
.loop:
cmp ecx, 1
je .is
pop eax
push eax
@Allen-B1
Allen-B1 / writeint.asm
Last active October 24, 2018 01:45
Write integer to stdout in assembly
; usage
; mov eax, NUMBER
; call writeint
writeint:
mov ecx, 10
.pushloop:
mov ebx, 10
xor edx, edx
div ebx