This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run following command | |
sudo spctl --master-disable | |
# Install your third-party application on the machine. After installation is complete, run the command below | |
# Run following command | |
sudo spctl --master-enable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const getTwitterHandles = Array.from(document.querySelectorAll('a[href^="https://twitter.com"]')).map(i => i.getAttribute('href').replace('https://twitter.com/', '@')).join("\n"); | |
console.log(getTwitterHandles); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Write a function that takes input of arrays and loops over them to calculate return values based on some criteria. For example, take this array [['oranges', 1], ['apples', 2], ['grapes', 7]]. Based on this array return total costs if second array property is a quantity and product is first array item. If say Oranges cost $5, and user buys the quantity of 2 or more, apply a 20% discount etc.. Return total cost from array by adding them all up. | |
Let's assume: | |
Orange = $2 | |
Apple = $3 | |
Grapes = $5 | |
*/ | |
const sampleData = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Copy code below and run in browser console | |
"use strict";document.querySelectorAll("td, #hnmain").forEach(e=>e.setAttribute("bgcolor","")),document.querySelectorAll("a").forEach(e=>e.style.cssText="color:inherit"),document.querySelectorAll(".storylink").forEach(e=>e.style.cssText="color:white"),document.querySelectorAll(".pagetop *, span").forEach(e=>e.style.cssText="color:grey"),document.querySelector("body").style.cssText="background-color:#222;color:#fff"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// thestar.com | |
// Open any locked article on thestar.com/business/personal_finance | |
// E.g. https://www.thestar.com/business/personal_finance/2021/01/04/this-29-year-old-was-laid-off-early-on-in-the-pandemic-she-recently-found-a-job-but-now-her-investment-property-is-sitting-vacant-how-can-she-achieve-her-saving-goals.html | |
// Paste script below in console and run | |
document.querySelectorAll('p').forEach(i => (i.style.display = 'block')); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run the following command to get modern browsers (make sure you have stable version of Brew installed on your Macintosh) | |
# Installation | |
brew install google-chrome-dev firefox-developer-edition brave-browser-dev opera-developer microsoft-edge-dev safari-technology-preview | |
# Uninstallation | |
brew uninstall google-chrome-dev firefox-developer-edition brave-browser-dev opera-developer microsoft-edge-dev safari-technology-preview |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setInterval(() => { | |
const b = document.querySelector('.Navigation-next'); | |
b.click(); | |
}, 10000); |