javascript:var videos=document.getElementsByTagName("video");for(vid in videos)videos[vid].src&&videos[vid].webkitSetPresentationMode("picture-in-picture");
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
| // Hit refresh when playing a Netflix video and paste the following code in your console. | |
| // This script will replace the native captions by WebVTT captions that will work in PiP mode. | |
| // Use the code here to trigger PiP in safari: https://gist.github.com/funkyremi/9d7b70285282d532c3f8c964810e7bf9 | |
| const lang = 'fr'; | |
| const hideNetflixCaptions = (() => { | |
| const style = document.createElement("style"); | |
| style.type = "text/css"; | |
| const hideCc = ".player-timedtext {display: none !important;}"; |
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
| # Get remaining battery time | |
| pmset -g batt|grep remaining|cut -d" " -f1,5 | |
| # Update Database (for locate) | |
| sudo /usr/libexec/locate.updatedb |
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
| export function getDomElement(selector = '', timeoutMs = 1000, pollIntervalMs = 10) { | |
| const timeStart = performance.now(); | |
| return new Promise((resolve, reject) => { | |
| const intervalId = setInterval(() => { | |
| const timeNow = performance.now(); | |
| const element = document.querySelector(selector); | |
| if (element) { | |
| clearInterval(intervalId); | |
| resolve(element); | |
| } else if ((timeNow - timeStart) > timeoutMs) { |
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 | |
| LOGFILE=/var/log/network-monitor.log | |
| if /sbin/ifconfig eth0 | grep -q "inet"; then | |
| echo "$(date "+%m %d %Y %T") : Ethernet OK" | |
| else | |
| echo "$(date "+%m %d %Y %T") : Ethernet connection down! Attempting reconnection." >>$LOGFILE | |
| /sbin/ifconfig eth0 up | |
| OUT=$? |
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
| version: '3.3' | |
| services: | |
| db: | |
| image: mysql:5.7 | |
| volumes: | |
| - db_data:/var/lib/mysql | |
| restart: always | |
| ports: | |
| - 3306:3306 |
OlderNewer