Skip to content

Instantly share code, notes, and snippets.

@friendlyanon
friendlyanon / vec3.js
Created July 28, 2018 15:11
3D Vector class
"use strict";
const { isArray } = Array
const { abs, atan2, round, sqrt, cos, sin } = Math;
function num(n, d) {
return n !== undefined ? Number(n) : d;
}
function parseArgs(x, y, z) {
if (typeof x === "object" && x !== null) {
export function format(f) {
const argsLen = arguments.length;
if (argsLen < 2) return f;
const fLen = f.length - 1;
let str = "";
let a = 2;
let lastPos = 0;
let tempStr;
for (let i = 0; i < fLen; ++i) {
// ==UserScript==
// @id fix-old-youtube-layout
// @name Fix old Youtube layout (2018.08.17.)
// @version 1
// @namespace intermission
// @author intermission
// @description Fixes old Youtube layout (2018.08.17.)
// @match https://www.youtube.com
// @match https://www.youtube.com/*
// @run-at document-start
"use strict";
var pow = Math.pow,
floor = Math.floor,
powArray = Array(54).map(function(_, i) { return pow(2, i); });
function intersection53() {
var map, key, i, j, len, mask, arr, value, n1, n2, b, r, argsLen, result;
for (map = {}, i = 0, argsLen = arguments.length; i < argsLen; ++i) {
(function() {
"use strict";
var InvalidStateError, NetworkError, ProgressEvent, SecurityError, SyntaxError, XMLHttpRequest, XMLHttpRequestEventTarget, XMLHttpRequestUpload, http, https, os, url, extend, format, g;
g = (
typeof global !== "undefined" ?
global :
typeof self !== "undefined" ?
self :
typeof window !== "undefined" ?
@friendlyanon
friendlyanon / readme.txt
Created November 17, 2016 21:35
6.61 Adrenaline
- 6.61 Adrenaline -
A software that transforms your PS Vita into a two-in-one device
- About this release -
I have decided to release Adrenaline earlier than planned since I'm going to have exams soon and
therefore won't have time to do anything for the scene. I will take a break until February
and will return back to add the remaining features for Adrenaline. Wait, what is remaining?
This release of Adrenaline does not have all features that I have been talking about.
The reason therefore is that I want to have a stable v1 release first before adding more things.
These features are not included yet:
function isIsogram(s) {
var map, str, c, i, l, e, h;
if (typeof s !== "string") return false;
if ((l = s.length) < 2) return true;
c = (str = s.toLowerCase()).codePointAt();
if ((h = c > 0xFFFF) && l < 4) return true;
(map = {})[c] = true, e = l - 2, i = +h;
do {
if (map[c = str.codePointAt(++i)]) return false;
if (c > 0xFFFF) if (i === e) return true; else ++i;
if (!Object.fromEntries) {
Object.defineProperty(Object, "fromEntries", {
value: function fromEntries(iterable) {
const obj = {};
for (const pair of iterable) {
if (typeof pair !== "object" || pair === null) {
throw new TypeError("iterable for fromEntries should yield objects");
}
obj[pair[0]] = pair[1];
}
@friendlyanon
friendlyanon / aya.mjs
Last active September 19, 2018 18:55
import { Server } from "_http_server";
const Aya = class Aya {
constructor() {
this.routes = {
GET: [],
HEAD: [],
POST: [],
PUT: [],
"use strict";
class CaptchaScraper {
constructor(key, referer) { this.key = key, this.referer = referer; }
then(resolve) {
this._https.get(
`https://www.google.com/recaptcha/api/fallback?k=${this.key}`,
{ headers: { Referer: this.referer } },
resolve
);
}