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 | |
# Merge .TS video segments based on timestamp (<= 3 min gap) into MP4 | |
# Output format: YYYYMMDD_HHMM-YYYYMMDD_HHMM-NNNmin.mp4 | |
INPUT_DIR="${1:-.}" | |
cd "$INPUT_DIR" || exit 1 | |
OUTPUT_DIR="merged" | |
mkdir -p "$OUTPUT_DIR" |
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
/** | |
* Replacing "banned" strings as textNode values with unified string in HTML document | |
* Resources: | |
* - https://stackoverflow.com/questions/2579666/getelementsbytagname-equivalent-for-textnodes | |
* - https://developer.mozilla.org/en-US/docs/Web/API/Document/createTreeWalker | |
*/ | |
function censoreTextNodes() { | |
var walker = document.createTreeWalker( | |
document.body, | |
NodeFilter.SHOW_TEXT, |
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
@echo off | |
:: Prepends all .m4a voice records downloaded from iPhone with metadata creation_time converted to local timezone in YYYYMMDD-HHMMSS- format | |
:: Presumes existence of: ffprobe, grep, head, cut and php in local path :-) | |
for /F "delims=" %%i in ('dir /b /on *.m4a ^| grep -vPe "^20[123][0-9]{5}\-[0-9]{6}\-"') do ( | |
call :prependTimestamp %%i | |
) | |
goto :exit |
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
@echo off | |
:: windows binary @ https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp.exe | |
yt-dlp.exe -o "%%(playlist_index)s - %%(title)s.%%(ext)s" %* |
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
@echo off | |
:: skript pro logovani aktivniho casu straveneho u obrazovky / remote session | |
:: je spusten kdykoliv pocitac prejde do rezimu "locked" a take kdyz je naopak odemceny (at uz vzdalene, nebo lokalne) | |
:: dependencies: xdate, gawk, cat | |
:: (vse soucasti portu linuxovych nastroju pro windows; xdate je prejmenovane linuxove `date`, ktere umi snadno vyprodukovat datum a cas v pozadovanem formatu) | |
setlocal EnableDelayedExpansion | |
for /f %%i in ('xdate "+%%Y-%%m-%%d_%%H:%%M:%%S"') do set xtimestamp=%%i |
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
@echo off | |
:: Run in folder containing direct iphone image subfolders backup eg. 100apple, 101apple, etc. | |
:: it will iterate through and separate video and received images to subdirs | |
:: Prerequisite: Having `grep` and `mv` binaries in path | |
FOR /F %%i IN ('dir /on /b /ad') DO ( | |
echo %%i | |
call :videosubdir %%i | |
call :whatsapp %%i |
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
<?php | |
/** | |
* "Jednoducha" konverze souradnicovych systemu | |
* - GPStoKrovak = wgs84 -> s-jstk | |
*/ | |
class GeoConvert { | |
/** | |
* GPStoKrovak = wgs84 -> s-jstk | |
* Spolehlive funguje jen pro GPS v ramci Ceske Republiky a bezprostredniho okoli | |
* INFO: Jedna se o upraveny kod z JS funkce na https://www.pecina.cz/krovak.html |
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
<?php | |
/** | |
* Return (file)size in bytes in more friendly format (like -h) and append units | |
* Eg. 102400 => 100 kB | |
* @param int $size ~ size in bytes | |
* @param int $forcePrecision ~ how many decimals in output | |
* @param string $forceUnits ~ force output units (eg. 'kb') | |
* @return string | |
*/ |