Skip to content

Instantly share code, notes, and snippets.

const addVideo = function () {
var video = ['HP362ccZBmY', 'oHg5SJYRHA0'].sort(() => Math.random() - 0.5).pop();
var div = document.createElement('div');
div.innerHTML = '<iframe width="560" height="315" src="https://www.youtube.com/embed/' + video + '?autoplay=1" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>';
div.setAttribute('style', 'position: fixed; right: 10px; bottom: 10px;z-index: 100000');
document.body.appendChild(div);
}
const fadeText = function () {
function getRandomColor () {
@pjobson
pjobson / latitude_longitude.txt
Last active January 27, 2024 15:28
Latitude / Longitude DMS, DDM, DD Regular Expressions
Degrees Minutes Seconds (DMS)
40° 26′ 46″ N 79° 58′ 56″ W
40° 26′ 46″ S 79° 58′ 56″ E
90° 0′ 0″ S 180° 0′ 0″ E
40° 26′ 45.9996″ N 79° 58′ 55.2″ E
Latitudes range from 0 to 90.
Longitudes range from 0 to 180.
Minutes & Seconds range from 0-60
Use N, S, E or W as either the last character,
which represents a compass direction North, South, East or West.
import os
import sys
import struct
import binaryninja
def touch(fname, times=None):
with open(fname, 'a'):
os.utime(fname, times)
#-------------------------------------------------------------------
@mjmckinnon
mjmckinnon / rsa_crt_recovery.py
Last active March 23, 2024 09:11
Recovery of a full RSA PrivateKey from only the CRT exponent1 (dP) and exponent2 (dQ)
#!/usr/bin/python
# Written by: Michael McKinnon @bigmac
# Get in contact with me if you found this useful
import os
import sys
import gmpy2
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5