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
| find . -size +2M -name "*.jpg" | xargs -I {} sudo convert "{}" -resize 2048x2048 -quality 70% -density 72 -verbose "{}" |
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 sPoints = '4.78,144.93 14.74,124.24 3.33,103.45 0.96,82.88 16.31,62.43 5.59,41.86 0.2,21.29 25.35,1.13 490.9,0.18 490.2,5.86 495.48,27.12 483.43,49.25 476.42,71.15 496,91.72 483.6,113.85 493.97,134.88 499.18,154.58 3.56,155.53' | |
| const iViewboxWidth = 500; | |
| const iViewboxHeight = 155; | |
| const aPoints = sPoints.split(' ').map(function(v) | |
| { | |
| v = v.split(','); | |
| v[0] = Math.round((v[0]/iViewboxWidth) * 10000)/100+'%'; | |
| v[1] = Math.round((v[1]/iViewboxHeight) * 10000)/100+'%'; | |
| return v.join(' '); |
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
| Stop MySQL instance and install MariaDB instance | |
| Next, stop MariaDB instance and start MySQL instance | |
| Export MySQL databases: | |
| mysqlpump --user=root --password --exclude-databases=mysql,sys,information_schema --result-file=backup_full.sql | |
| sed -i 's/utf8mb4_0900_ai_ci/utf8mb4_general_ci/g' backup_full.sql | |
| Export MySQL users: | |
| mysqldump -uroot -p --opt --system=users --insert-ignore > users.sql | |
| remove all references to 'root' users from this file |
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
| sudo dd if=/dev/rdiskX bs=1m | pv -s 64G | sudo dd of=/dev/rdiskY bs=1m |
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
| { | |
| "name": "NPO Full-screen", | |
| "version": "0.0.1", | |
| "manifest_version": 2, | |
| "description": "Make NPO channels Full-screen", | |
| "browser_action": { | |
| "name": "Manipulate DOM", | |
| "icons": ["icon.png"], | |
| "default_icon": "icon.png" | |
| }, |
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
| $(document).on('touchmove',function(e) | |
| { | |
| e.preventDefault(); | |
| }); | |
| $(document).on('touchstart', '.scroller', function(e) | |
| { | |
| this.startScrollY = e.originalEvent.touches[0].screenY; | |
| this.mayScroll = false; | |
| }); |