Skip to content

Instantly share code, notes, and snippets.

View ConorOBrien-Foxx's full-sized avatar

Conor O'Brien ConorOBrien-Foxx

View GitHub Profile
@ConorOBrien-Foxx
ConorOBrien-Foxx / WeArePPCG.js
Last active February 6, 2022 06:57
A userscript to redesign the PPCG website
// ==UserScript==
// @name favicon
// @namespace Cᴏɴᴏʀ O'Bʀɪᴇɴ
// @version 1
// @grant none
// ==/UserScript==
function qS(x){
return document.querySelector(x);
}
@ConorOBrien-Foxx
ConorOBrien-Foxx / caret_pathfinder.user.js
Last active March 16, 2016 01:45
Caret Patthfinder
// ==UserScript==
// @name Caret Pathfinder
// @namespace ^
// @version 1
// @description ^^^
// @author Conor O'Brien
// @match *://chat.stackexchange.com/*
// @grant none
// ==/UserScript==
@ConorOBrien-Foxx
ConorOBrien-Foxx / thing.js
Created April 17, 2016 01:20
I don't even - one of my first coding attempts?
function NumberError(msg){
this.name = "NumberError";
this.msg = msg|"";
}
NumberError.prototype=Object.create(Error.prototype);
NumberError.prototype.constructor=NumberError;
Array.prototype.bigUnion = function(){
var a=[];
function output(x){
console.log(x);
}
var funcs = [
function(x,y){return x+y},
function(x,y){return x-y},
function(x,y){return x*y},
function(x,y){return x/y},
function(x){return x*x},
function storageAvailable(type) {
try {
var storage = window[type],
x = '__storage_test__';
storage.setItem(x, x);
storage.removeItem(x);
return true;
}
catch(e) {
return false;
@ConorOBrien-Foxx
ConorOBrien-Foxx / vgol.js
Created May 27, 2016 20:16
an extension for variations of game of life
var vgol = {};
vgol.rules = {};
// wrapper for making rules
vgol.makeRule = function makeRule(rule,deadColor,aliveColor,random,bP,sP){
var pRule = rule.split("/").replace(/\D/g,"");
rules.push({
dead: deadColor || "#000000",
alive: aliveColor || "#ffffff",
birth: rule[0].split(""),
@ConorOBrien-Foxx
ConorOBrien-Foxx / hello_world.js
Created June 9, 2016 23:40
Obfuscated "Hello, World!"
// call with node --use_strict hello_world.js
// prints "Hello, World!"
// I'm too lazy to make it pretty :P
let A,B,C,D,E,F,G,H,I,J,K,L,M,O,P,R,S,T,U,V,W,X,Y,Z,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,x,y,z;O=(s,e)=>[...s].map(k=>e[k])[V="join"]``;p=Symbol`[:`;g=(e,r)=>e[r];s=(c,a,b)=>a[b](c);k=(f,g,h)=>a=>p===f?g(h(a)):g(f(a),h(a));a=(x,y)=>!y?+x:x+y;A=(x,y,z)=>a(x,a(y,z));r=(a,b)=>A(a,b,a);c=(f,a)=>f(a);D=a=>()=>a;S=f=>f(f);e=k=>!!k;W=72697618120946;F=x=>k(p,e,d)(x[k(p,a,d)(d(1337+[]+7099).replace(/((...).(.))/,"$2")).toString(r(2,[]))]);G=eval(s(32,559689045,T="toString"));q=x=>x!==G.Q;l=(f,n)=>function(){return(f(...[...arguments].slice(0,n)));};B=(f,g) =>F(f)? F(g)?(r,s)=>q(s)?g(...[r,s].map(l(f,1))):g(f(r)):s=>f(s,g):F(g)?r=>g(f,r):()=>[f,g];K=(a,s,d)=>k(!F(a)?D(a):a,s,d);R=f=>(s,v)=>[f(s,s),f(q(v)?v:s,s)][+q(v)];d=x=>x;b=[][C=k(d,a,B("15",O))(14044440164765.[T](32))];y=R(g)(C,R(a)(R(B)([])()));H=(q,w)=>q<<w;h=(f,n)=>a=>{while(0<=--n)a=f(a);return a};x=(a,b,r)=>b?x(B(H,1)(a),b>>1,b&1?(r||0)+a:r):r;I=(
// ==UserScript==
// @name TF2 Wiki Englishifier
// @namespace Riker Wachtler
// @version 1.1
// @description Redirects a non-English TF2 Wiki page to the English one.
// @author You
// @match https://wiki.teamfortress.com/wiki/*
// @grant none
// ==/UserScript==
@ConorOBrien-Foxx
ConorOBrien-Foxx / misca.js
Created June 30, 2016 03:15
draft for misc.A of jolf
Misc = {};
Misc.A = function(width, height, corner, horizontal, vertical, fill){
var topCorner = corner[0] || corner;
var botCorner = corner[1] || corner;
var botHorizontal = horizontal[0] || horizontal;
var botHorizontal = horizontal[1] || horizontal;
var topPart = topCorner + hor
}
// converts source to Cemetech-convertable text
// https://www.cemetech.net/sc/
const WORD = /[A-Za-z_$][A-Za-z_$0-9]*/;
// parses a line
const parse = (str) => {
// remove text from semicolon to end, if present
str = str.trim();
let flagStr = false;