Skip to content

Instantly share code, notes, and snippets.

View jezmck's full-sized avatar

Jez McKean jezmck

View GitHub Profile
@jezmck
jezmck / viewports.js
Last active September 1, 2023 09:23
Viewports array from https://viewports.fyi/data.json
console.log('adding window.viewportsByNumber');
window.viewportsByNumber = [
{ 'w': 390, 'h': 670, 'n': 8691 }, { 'w': 393, 'h': 666, 'n': 4800 },
{ 'w': 375, 'h': 635, 'n': 4618 }, { 'w': 390, 'h': 664, 'n': 2503 },
{ 'w': 393, 'h': 660, 'n': 2318 }, { 'w': 414, 'h': 721, 'n': 2130 },
{ 'w': 375, 'h': 641, 'n': 1890 }, { 'w': 428, 'h': 752, 'n': 1692 },
{ 'w': 375, 'h': 559, 'n': 1643 }, { 'w': 375, 'h': 629, 'n': 1393 },
{ 'w': 430, 'h': 746, 'n': 1231 }, { 'w': 412, 'h': 783, 'n': 824 },
{ 'w': 390, 'h': 663, 'n': 766 }, { 'w': 393, 'h': 722, 'n': 577 },
{ 'w': 414, 'h': 715, 'n': 565 }, { 'w': 390, 'h': 669, 'n': 543 },
@jezmck
jezmck / xss.js
Last active April 26, 2023 10:04
XSS Sample
alert('XSS!');
console.log('XSS!');
@jezmck
jezmck / YouTubeURLFormats.txt
Last active December 9, 2021 16:00 — forked from rodrigoborgesdeoliveira/ActiveYouTubeURLFormats.txt
Examples of the various YouTube URL formats
http://www.youtube.com/?feature=player_embedded&v=dQw4w9WgXcQ
http://www.youtube.com/?v=dQw4w9WgXcQ
http://www.youtube.com/e/dQw4w9WgXcQ
http://www.youtube.com/embed/tmY-G6sngk8
http://www.youtube.com/embed/tmY-G6sngk8?rel=0
http://www.youtube.com/v/-wtIMTCHWuI?version=3&autohide=1
http://www.youtube.com/v/0zM3nApSvMg?fs=1&hl=en_US&rel=0
http://www.youtube.com/v/dQw4w9WgXcQ
http://www.youtube.com/watch?feature=player_embedded&v=dQw4w9WgXcQ
http://www.youtube.com/watch?v=-wtIMTCHWuI
@jezmck
jezmck / _mapping.py
Last active July 14, 2019 13:47
Overly complex Raspberry Pi LoRa Node pHAT python code to get up and running
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
print('Starting...', flush=True)
import logging
logging.basicConfig(level=logging.DEBUG,
filename='/home/pi/lora/mapping.log',
filemode='a',
format='[%(asctime)s] %(message)s')