This file contains hidden or 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
| /* YouTube Chat Subscription Function. Written by VityaSchel | |
| * Subscribe to new messages in YouTube chat in JS (browser-only) | |
| * Pass callback function which gets 2 parameters: author, message | |
| * !! Does not support emojies, user badges, message deletions !! | |
| */ | |
| function subscribeToChat(chatMessageCallback) { | |
| let chatObserverCallback = (mutationsList, observer) => { | |
| let messageMutation = mutationsList.filter(mutation => mutation.target.id === 'items').find(itemDOM => itemDOM.addedNodes.length > 0) | |
| if(messageMutation === undefined || messageMutation.addedNodes.length === 0) { return; } |
This file contains hidden or 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
| #!/usr/bin/env python | |
| """ | |
| Fast duplicate file finder. | |
| Usage: duplicates.py <folder> [<folder>...] | |
| Based on https://stackoverflow.com/a/36113168/300783 | |
| Modified for Python3 with some small code improvements. | |
| """ | |
| import os | |
| import sys |