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
/** | |
* Sometimes, an element that you might need to retrieve | |
* is not visible right away. It might be added later on | |
* via an asynchronous action. | |
* | |
* This is where MutationObserver in JS comes in | |
* and here you can learn from example. | |
* | |
* Example will retrieve video element from the web page. | |
*/ |
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
// Find missing numbers in the array | |
const numbers = [1, 2, 7, 3, 5, 4, 9] | |
let missing = [] | |
for (var i = 1; i <= Math.max(...numbers); i++) { | |
if (!numbers.includes(i)) { | |
missing.push(i) | |
} | |
} |
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
# Disable `.DS_Store` file creation on Network & USB | |
defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true | |
defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true | |
# Check the current policy | |
defaults read com.apple.desktopservices |
OlderNewer