Skip to content

Instantly share code, notes, and snippets.

View walpolea's full-sized avatar

Andrew walpolea

View GitHub Profile
@walpolea
walpolea / color-picker-bookmarklet.js
Created April 5, 2024 16:21
Color Picker Bookmarklet
const cp = document.querySelector('.colorpickerbookmarklet');
if(cp) {
cp.parentElement.removeChild(cp);
} else {
const cpc = document.createElement('div');
cpc.innerHTML = `<input class="colorpickerbookmarklet" type="color" style="z-index:999999;position:fixed;right:2px;bottom:2px;">`;
cpc.firstChild.addEventListener("change", watchColorPicker, false);
function watchColorPicker(event) {
const el = document.createElement('textarea');
el.value = event.target.value;
@walpolea
walpolea / DisneylandQueueInfo.js
Created April 16, 2021 04:44
Paste this into your devtools console on your Disneyland ticket or reservation queue page to get better updates!
(function() {
const qUpdate = document.createElement("div")
qUpdate.classList.add(".queue-update");
qUpdate.setAttribute('id', 'qUpdate');
document.body.prepend(qUpdate);
qUpdate.innerHTML = `<div style="margin:20px;text-align:center;"><h1>Waiting for data to load...</h1></div>`;
var origOpen = XMLHttpRequest.prototype.open;
XMLHttpRequest.prototype.open = function() {
@walpolea
walpolea / macos_fix.md
Last active November 12, 2020 22:03
Fix for MacOS trustd slowness
  • Open terminal (cmd + space, type terminal, press enter)
  • type: sudo nano /etc/hosts and press enter
  • enter your mac admin password and press enter
  • you will now be editing your hosts text file in the terminal (you can't use your mouse for this)
  • use the down arrow key to move the cursor to the bottom of the text file to a blank line, or if the last line is not blank move the cursor to the end of the line and press enter
  • type (or copy/paste): 0.0.0.0 http://ocsp.apple.com
  • press control + o (not cmd), press enter, then control + x
var destFolder, sourceFolder, files, fileType, sourceDoc, targetFile;
// Select the source folder.
sourceFolder = Folder.selectDialog("Select the folder with EPS files you want to convert to SVG", "~");
// If a valid folder is selected
if (sourceFolder != null) {
files = new Array();
fileType = "*.eps";
files = sourceFolder.getFiles(fileType);
let TEXTSTR = "";
document.querySelectorAll('span[unselectable="on"]').forEach((s) => (TEXTSTR += s.innerText));
TEXTSTR = TEXTSTR.split("");
let I = document.querySelector('input[autocorrect="off"]');
let i = setInterval(() => {
TEXTSTR.length > 0 ? (I.value += TEXTSTR.shift()) : clearInterval(i);
}, 5);
[
{
"x": 89,
"y": 1,
"symbol": "OM",
"name": "OuterMembrane",
"argb": -12228727,
"data_members": {
"id": "1097207175",
"setByIdentifier": "true",
<section>
<h3>Ingredients</h3>
<ul>
<li>3/4 cup sugar</li>
<li>1 1/2 teaspoons pumpkin pie spice</li>
<li>1/2 teaspoon salt</li>
<li>1 can pumpkin</li>
<li>1 1/4 cups evaporated milk or half and half</li>
<li>2 eggs, beaten</li>
<li>1 frozen deep-dish pie crust</li>