Skip to content

Instantly share code, notes, and snippets.

View matthewpizza's full-sized avatar
🌸
°˖✧◝(◠ᴥ◠)◜✧˖°

matthewpizza

🌸
°˖✧◝(◠ᴥ◠)◜✧˖°
View GitHub Profile
const logAllEventsForEl = (el) => {
Object.keys(el.__proto__.__proto__)
.reduce((eventNames, key) => {
if (key.startsWith('on')) {
return [...eventNames, key.substr(2)]
}
return eventNames
}, [])
.map(eventName => {
el.addEventListener(eventName, event => console.log(event.type))
const browserName = {
browsers: [
'Chrome',
'Firefox',
'Opera',
'Safari',
'MobileChrome',
'MobileSafari',
],
toString() {
.git
.gitignore
title year character
The Climbers 2019
The Mystery of Dragon Seal: Journey to China 2019 Master
The Knight of Shadows: Between Yin and Yang 2019 Pu Songling
Namiya 2017 Namiya
Bleeding Steel 2017 Lin Dong
On the Scene with Lindalee 2017
The Lego Ninjago Movie 2017 Master Wu / Mr. Liu (voice)
WildAid: Jackie Chan & Pangolins 2017 Kung Fu instructor
The Nut Job 2: Nutty by Nature 2017 Mr. Feng (voice)
@matthewpizza
matthewpizza / build-list.js
Last active December 18, 2017 21:36
Trying to backup my Instagram stuff because their sandboxed API limitations only let you get the most recent 20 items
// Step 1: Scroll down until all items have loaded.
// Step 2: Paste the following into the console.
// TODO: Probably the classNames and document structure change ¯\_(ツ)_/¯
const items = document.querySelectorAll('._mck9w._gvoze._f2mse');
const media = [];
let item;
for (let i = 0, len = items.length; i < len; i++) {
javascript:(function()%7Bvar%20images%20%3D%20document.querySelectorAll('meta%5Bname%3D%22og%3Aimage%22%5D%2Cmeta%5Bproperty%3D%22og%3Aimage%22%5D')%3Bif%20(!images.length)%20%7Breturn%3B%7Dvar%20el%20%3D%20document.createElement('div')%3BObject.assign(el.style%2C%20%7Bposition%20%20%20%20%20%20%20%3A%20'fixed'%2Ctop%20%20%20%20%20%20%20%20%20%20%20%20%3A%200%2Cleft%20%20%20%20%20%20%20%20%20%20%20%3A%200%2CzIndex%20%20%20%20%20%20%20%20%20%3A%20'2147483647'%2Cwidth%20%20%20%20%20%20%20%20%20%20%3A%20'400px'%2Cheight%20%20%20%20%20%20%20%20%20%3A%20'100%25'%2Coverflow%20%20%20%20%20%20%20%3A%20'scroll'%2CbackgroundColor%3A%20'white'%7D)%3Bfor%20(var%20i%20%3D%200%2C%20len%20%3D%20images.length%3B%20i%20%3C%20len%3B%20i%2B%2B)%20%7Bvar%20img%20%3D%20new%20Image()%3Bimg.src%20%3D%20images%5Bi%5D.content%3BObject.assign(img.style%2C%20%7Bdisplay%3A%20'block'%2Cwidth%20%20%3A%20'380px'%2Cheight%20%3A%20'auto'%2Cmargin%20%3A%20'20px%20auto'%7D)%3Bel.appendChild(img)%3B%7Dfunction%20closePanel(event)%20%7Bif%20(1%2
@matthewpizza
matthewpizza / .htaccess
Created November 29, 2016 16:05
Rewrite requests to WordPress in a subdirectory
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
#!/usr/local/bin/fish
pushd (dirname (status -f)) > /dev/null
set dir (pwd)
popd > /dev/null
@matthewpizza
matthewpizza / books2016.md
Last active December 31, 2016 17:17 — forked from maxfenton/books.md
Books I finished reading in 2016

Books I finished reading in 2016.

  • M Train - Patti Smith
  • Please Kill Me - Legs McNeil and Gillian McCain
  • Revelation Space - Alastair Reynolds
  • City of Quartz - Mike Davis
  • Left Hand of Darkness - Ursula Le Guin
  • True Names - Vernor Vinge
  • Snow Crash - Neal Stephenson
  • Neuromancer - William Gibson