Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name Twitch.Plug.DJ
// @namespace twitch.plug.dj
// @include http://plug.dj/*
// @include https://plug.dj/*
// @version 1
// @grant none
// @description Integrates twitch streams into plug.dj
// ==/UserScript==
@Anaerin
Anaerin / SVG Curly Marquee.htm
Last active February 27, 2016 22:23
Just a test...
<link href='http://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<div class="contain-demo">
<svg width="620" height="200">
<defs>
<path id="testPath" d="M33.858,150.079
c11.975-4.27,24.203-7.505,36.886-9.269c36.049-5.015,72.766,0.364,108.379,5.91c40.242,6.267,80.697,9.723,121.433,9.69
c36.672-0.03,77.969-1.382,112.804-13.971c16.76-6.057,30.847-15.648,38.949-32.09c15.894-32.258-12.098-67.663-44.498-72.831
c-27.709-4.42-63.533,24.213-53.21,54.99c5.929,17.669,29.09,11.549,41.399,5.908" />
</defs>
-- Globals - Change these to suit your turbines and consumption needs.
RPMTarget = 1700
StoredShutoff = 90 -- Capacitor amount, in %
StoredRestart = 10 -- Capacitor amount, in %
-- Set up variables
turbines = {}
local pers = peripheral.getNames()
local screenWidth
local screenHeight

Code Map

Okay, here's how this sucker's going to work.

/lib

General utility functions and objects. For instance...

log.js

@Anaerin
Anaerin / BitTechWidescreen.user.css
Last active July 5, 2017 18:25
New (06-2017) Bit-Tech Widescreen fix
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("bit-tech.net") {
.pageContainer {
/* Set max-width to how wide you'd like the page to be */
max-width: 90% !important;
width: 100% !important;
}
/*
@Anaerin
Anaerin / MergeSort.js
Last active June 11, 2021 20:37
Merge Sort for Javascript
function MergeSort(arrInput) {
// If there's only 1 entry, return it.
if (arrInput.length == 1) return arrInput;
// If there are 2 entries, return them in the right order.
else if (arrInput.length == 2) {
// If the second entry is bigger, return it first
if (arrInput[1] > arrInput[0]) return [arrInput[1], arrInput[0]];
// Otherwise, the first entry is bigger, or they're equal, so return them as-is