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
| function devToolsOpened(){ | |
| return window.outerHeight - window.innerHeight > 100; | |
| } | |
| function devToolsWatcher(){ | |
| console.log(devToolsOpened()); | |
| } | |
| setInterval(devToolsWatcher, 1000); |
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
| for f in *.html; do | |
| [[ $f =~ ([0-9]+).html ]] | |
| mv "$f" $(printf "%03d.html" ${BASH_REMATCH[1]}) | |
| done |
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
| docker rm `docker ps -a | grep Exited | awk '{print $1 }'` | |
| docker rmi `docker images -aq` |
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
| from math import sqrt | |
| def primosHasta(n): | |
| numbers = range(2, n) | |
| for i in range(2, int(2*sqrt(n))): | |
| numbers = filter(lambda x: x==i or x%i, numbers) | |
| return numbers |
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
| inotifywait -m -e modify -e create --format '%w%f' . | while read file; do (cp "$file" ./tmp/"$file$(date +%T)$counter.bk") done |
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 | |
| oFilename=$(basename "$1") | |
| extension="${oFilename##*.}" | |
| filename="${oFilename%.*}" | |
| if [ "$extension" == "pdf" ]; then | |
| convert -thumbnail 300 "$oFilename"[0] "$filename".thumb.png | |
| else | |
| convert -thumbnail 300 "$oFilename" "$filename".thumb.png | |
| fi |
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
| # Example perl -pe 's/{css}/`cat stylesheet.css`/ge' -i index.html | |
| perl -pe 's/{tag}/`cat file.from`/ge' -i file.to |
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
| import hashlib | |
| import time | |
| def genToken(password): | |
| h = hashlib.sha1(password) | |
| h.update(str(int(time.time()*1000))) | |
| return h.hexdigest() | |
| def isValid(password, token): | |
| t = int(time.time()*1000) | |
| for i in range(5000): |
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
| <html style="cursor: none"> | |
| <script> | |
| var x = 0; | |
| var y = 0; | |
| document.addEventListener("mousemove", function(e){ | |
| document.getElementById("pacman").style.left = e.x; | |
| document.getElementById("pacman").style.top = e.y; | |
| console.log("x ", x, "; y ", y); |
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
| # $1 -> cue file | |
| # $2 -> flac file | |
| cuebreakpoints $1 | shnsplit -o flac $2 |