Skip to content

Instantly share code, notes, and snippets.

(() => {
[...document.getElementsByTagName('a')].forEach(x => x.addEventListener("mouseover", () => warnABrotha(x), false));
})();
function warnABrotha(x) {
if (x.href.includes("rebecca.blackfriday")) alert("it's friday");
}
$GPGGA,123519,4807.038,N,01131.000,E,1,08,0.9,545.4,M,46.9,M,,*47
$GPGSA,A,3,04,05,,09,12,,,24,,,,,2.5,1.3,2.1*39
function withinRadius(v, r) {
return v.l < r;
}
function getDistance(playerA, playerB) {
const x = playerA.position.x - playerB.position.x;
const y = playerA.position.y - playerB.position.y;
const l = Math.sqrt((x * x) + (y * y));
return {x, y, l};
}
@ryankinal
ryankinal / LICENSE
Created February 13, 2014 21:51 — forked from rlemon/LICENSE
RYAN KINAL ESQUIRE PUBLIC LICENSE
Version 1, February 2014
Copyright (C) 2014 Ryan Kinal <email@address.com>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed, it is not used for evil (If you have to ask yourself if it is being used for evil, it is probably being used for evil.), and you consider buying Ryan Kinal a beer(no cheap stuff... well okay).
RYAN KINAL ESQUIRE PUBLIC LICENSE
@rlemon
rlemon / chat-youtube-fix.user.js
Last active December 31, 2015 01:38
SE Chat Inline YouTube UserScript - Replaces the new window youtube links with inline videos
// ==UserScript==
// @name SE Chat Inline YouTube
// @author Robert Lemon
// @version 0.1
// @namespace http://rlemon.ca
// @description Replaces the new window youtube links with inline videos
// @include http://chat.stackexchange.com/rooms/*
// @include http://chat.stackoverflow.com/rooms/*
// ==/UserScript==
function EmbedCodeOnPage(type, kode) {
@Zirak
Zirak / gist:3086939
Last active August 27, 2022 22:01
xhr for dummies

So, you want to send a motherfucking XMLHttpRequest (XHR, or commonly and falsly known as AJAX.) Too bad, just ran out of motherfucking XMLHttpRequests; but I still have one regular. XHR is not magic. It does not autofuckinmagically send things the way you want them do be sent. It does not do the thinking for you. It just sends an Http Request.

You get a hold on such a prime beast like this: