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
var nr = 0; | |
function cage() { | |
var resources = performance.getEntriesByType("resource"); | |
if (resources.length > nr){ | |
nr = resources.length | |
var imgs = document.getElementsByTagName('img') | |
Array.from(imgs).forEach((e)=>{e.setAttribute('src', 'https://i.imgur.com/a4CBVXS.png')}) | |
return | |
} | |
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
const sanitizeJSON = function (badJSON) { | |
return badJSON | |
.replace(/:\s*"([^"]*)"/g, function(match, p1) { | |
return ': "' + p1.replace(/:/g, '@colon@') + '"'; | |
}) | |
.replace(/:\s*'([^']*)'/g, function(match, p1) { | |
return ': "' + p1.replace(/:/g, '@colon@') + '"'; | |
}) | |
.replace(/(['"])?([a-z0-9A-Z_]+)(['"])?\s*:/g, '"$2": ') | |
.replace(/@colon@/g, ':') |
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
#!/bin/bash | |
changed_files=$(git diff --name-only --diff-filter=d HEAD | grep '\.py$') | |
for file in $changed_files; do | |
isort "$file" | |
black "$file" | |
done |