ffmpeg -i source_file.mkv -i video_subtitles.sub -map 0 -map 1 -metadata:s:s:0 language=eng -c copy target_file.mkv
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
| javascript: (() => { | |
| const keys = Object.keys(localStorage).filter(k => k.startsWith('recent-')); | |
| keys.forEach(k => localStorage.removeItem(k)); | |
| const el = document.querySelector('reddit-recent-pages'); | |
| if (el) el.remove(); | |
| console.log(`Removed ${keys.length} localStorage item(s) with "recent-"`); | |
| console.log(el ? 'Removed <reddit-recent-pages> from DOM' : 'No <reddit-recent-pages> found'); | |
| })(); |
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 ab_detail = {}; | |
| ab_detail.title = document.querySelectorAll('h1')[0].textContent.trim(); | |
| ab_detail.subtitle = document.querySelectorAll('h2')[0].textContent.trim(); | |
| var __get_ab_metadata = (selector, index) => { | |
| return JSON.parse( | |
| document.querySelectorAll(selector)[index].textContent.trim() | |
| ); | |
| } |
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 bash | |
| SLEEP_INTERVAL=5 | |
| LOG_FILE="/tmp/wifi_monitor_$(date -u +%Y-%m-%d).json" | |
| __get_wifi_info(){ | |
| sudo wdutil info | egrep "(RSSI|Tx Rate|^\s*Channel\s*\:)" | |
| } | |
| __get_rssi(){ |
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
| /* The follwing Javascript is to be used inside a browser's console to extract | |
| data from the first three columns of the table. The website this code is designed | |
| for is: https://www.serebii.net/pokemon/gen6pokemon.shtml | |
| */ | |
| var tableRows = document.querySelectorAll('.dextable tr'); | |
| var csvContent = ''; | |
| tableRows.forEach(function(row) { | |
| var rowData = []; |
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 node | |
| var dtmf = { | |
| "0":{ "hf": "1336", "lf": "941" }, | |
| "1":{ "hf": "1209", "lf": "697" }, | |
| "2":{ "hf": "1336", "lf": "697" }, | |
| "3":{ "hf": "1477", "lf": "697" }, | |
| "4":{ "hf": "1209", "lf": "770" }, | |
| "5":{ "hf": "1336", "lf": "770" }, | |
| "6":{ "hf": "1477", "lf": "770" }, |
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
| /* | |
| The following code is used to generate a string that adheres to a Plex filename | |
| convention for movie titles. This code can strip page titles from either | |
| TMDB or IMDB and put them in dot notation of: | |
| Movie.Title.Year.{source-sourceId} | |
| An extension is not provided as I do not know the extension of the target 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
| #!/usr/bin/env bash | |
| __http_request_example(){ | |
| curl \ | |
| --silent \ | |
| --location http://ip.jsontest.com \ | |
| --write-out "\n%{http_code}" | |
| } | |
| __response_formatter(){ |
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 bash | |
| # Learn More About Spotify API | |
| # https://developer.spotify.com/documentation/web-api/tutorials/getting-started | |
| if [ -z "${SPOTIFY_CLIENT_ID}" ] || [ -z "${SPOTIFY_CLIENT_SECRET}" ]; then | |
| echo "SPOTIFY_CLIENT_ID and SPOTIFY_CLIENT_SECRET must be set." | |
| exit 1 | |
| fi |
NewerOlder