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
/* | |
_____ _ __ _ _ _ __ ______ _ _ _ | |
/ __ \ | | / _| | | | | (_)/ _| | ___ \ | | | | | | | |
| / \/ ___ | | ___ _ __| |_ _ _| | | | _| |_ ___ | |_/ /___| |__ ___ ___ | |_ ___ __| | | |
| | / _ \| |/ _ \| '__| _| | | | | | | | | _/ _ \ | // _ \ '_ \ / _ \ / _ \| __/ _ \/ _` | | |
| \__/\ (_) | | (_) | | | | | |_| | | | |___| | || __/ | |\ \ __/ |_) | (_) | (_) | || __/ (_| | | |
\____/\___/|_|\___/|_| |_| \__,_|_| \_____/_|_| \___| \_| \_\___|_.__/ \___/ \___/ \__\___|\__,_| | |
Modern port of https://github.com/jaxry/colorful-life/ by @TheGreatRambler | |
*/ | |
function AttachColorfulLifeAnimation(canvasElement: HTMLCanvasElement) { |
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
precision mediump float; | |
varying vec4 vPosition; | |
#define PI 3.14159265358979 | |
#define APERTURE 180.0 | |
#define INSTA360_Y_BOTTOM 0.02 | |
#define INSTA360_Y_TOP 0.97 | |
#define INSTA360_X_LEFT 0.0 | |
#define INSTA360_X_RIGHT 1.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
uint64_t src = start + size; | |
uint64_t dest = new_start + size; | |
if(src % 8 != 0) { | |
uint8_t b = bytes[src >> 3] >> (8 - src % 8) & ((1UL << (src % 8)) - 1); | |
if(dest % 8 == 0) { | |
bytes[(dest >> 3) - 1] &= 0xFF << (src % 8); | |
bytes[(dest >> 3) - 1] |= b; | |
// std::cout << "1" << std::endl; |
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
(function() { | |
var canvas = document.getElementById("canvas"); | |
var gl = canvas.getContext("webgl"); | |
if(!gl) { | |
alert('Could not load WebGL'); | |
} | |
class Renderer { | |
constructor(canvas, gl, renderWidth, renderHeight) { |
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
package id | |
import ( | |
"fmt" | |
"strings" | |
) | |
func CourseIdToNum(id string) (int, error) { | |
id = strings.ToUpper(strings.ReplaceAll(id, "-", "")) | |
// https://github.com/kinnay/NintendoClients/wiki/Data-Store-Codes#super-mario-maker-2 |
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
const lineByLine = require("n-readlines"); | |
const axios = require("axios"); | |
const fs = require("fs"); | |
function has(str, char) { | |
return str.indexOf(char) !== -1; | |
} | |
const liner = new lineByLine("./words.txt"); | |
var outFile = fs.createWriteStream("validnames.txt"); |
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
(function() { | |
var MEMORY_KEYS_KEY, MEMORY_MAX_ITEMS, slice = [].slice, extend = function(child, parent) { | |
for (var key in parent) { | |
if (hasProp.call(parent, key)) | |
child[key] = parent[key] | |
} | |
function ctor() { | |
this.constructor = child | |
} | |
ctor.prototype = parent.prototype; |
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
// wshook.js | |
var wsHook={}; | |
(function(){function e(a){this.bubbles=a.bubbles||!1;this.cancelBubble=a.cancelBubble||!1;this.cancelable=a.cancelable||!1;this.currentTarget=a.currentTarget||null;this.data=a.data||null;this.defaultPrevented=a.defaultPrevented||!1;this.eventPhase=a.eventPhase||0;this.lastEventId=a.lastEventId||"";this.origin=a.origin||"";this.path=a.path||[];this.ports=a.parts||[];this.returnValue=a.returnValue||!0;this.source=a.source||null;this.srcElement=a.srcElement||null;this.target=a.target||null;this.timeStamp= | |
a.timeStamp||null;this.type=a.type||"message";this.__proto__=a.__proto__||MessageEvent.__proto__}var d=wsHook.before=function(a,c){return a},g=wsHook.after=function(a,c){return a};wsHook.resetHooks=function(){wsHook.before=d;wsHook.after=g};var f=WebSocket;WebSocket=function(a,c){this.url=a;var b=(this.protocols=c)?new f(a,c):new f(a);var d=b.send;b.send=function(a){arguments[0]=wsHook.before(a,b.url)||a;d.apply(this,arguments)};b._addEventListener=b.addEventListener;b.addEventListen |
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 | |
# copyright TheGreatRambler | |
# List all cowsay cows with a fun fortune! | |
stringtouse="$(fortune)" | |
timesaround=0 | |
for i in $(cowsay -l) | |
do | |
if (($timesaround > 2)) |
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
// Function that can run a function supplied in a web worker | |
// MIT License Copyright TheGreatRambler | |
// Free to use | |
function runInWebWorker(func, argsarray, callback) { | |
// func: function to use | |
// argsarray: the arguments to pass | |
// callback: the callback function | |
var blobdata = 'var returnstatement=(' + func.toString() + ')(' + argsarray.join(",") + ');self.postMessage(returnstatement);self.close();'; | |
console.log(blobdata); | |
var blobURL = URL.createObjectURL(new Blob([blobdata], { |
NewerOlder