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
// prepend comment to each INT | |
//@author sam_ | |
//@category DOS | |
//@keybinding | |
//@menupath | |
//@toolbar | |
import java.io.BufferedReader; | |
import java.io.ByteArrayInputStream; | |
import java.io.FileInputStream; |
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
# #ffmpeg | |
# SECONDS=900 | |
# DURATION=$(($(date "+$SECONDS-(%M%%15)*60-%S"))) | |
## tcp transport ensures bottom half of frame is not pixelated | |
# PRE_IN="-t $DURATION -rtsp_transport tcp" | |
# LOGIN= | |
# PASSWORD= | |
# IP= | |
# IN=rtsp://$LOGIN${PASSWORD:+:$PASSWORD}@$IP:554/mpeg4 | |
# START="$(date '+%Y%m%d_%H%M%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
// ==UserScript== | |
// @name uloz.to Aria2 bridge | |
// @namespace Violentmonkey Scripts | |
// @match https://uloz.to/* | |
// @run-at document-start | |
// @grant GM.xmlHttpRequest | |
// @version 1.0 | |
// @author sam_ | |
// @description Redirects downloads from uloz.to to speciffied Aria2 instance | |
// ==/UserScript== |
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
lookup() { # [awk_options] regex [regex ...]; like grep, but prints all first matches on success, everything when failed | |
! set +"${-//[^x]/}" > /dev/null 2> /dev/null || RESTORE_TRACING="set -x" | |
CMDS=' | |
BEGIN { delete PATT[0] } | |
BEGINFILE { if (FILENAME != "" && FILENAME != "-") { PATT[length(PATT)] = FILENAME; nextfile } } | |
function matchesAny(text) { for (i in PATT) if (text ~ PATT[i]) { delete PATT[i]; return 1 } } | |
{ allLines = allLines "" RS "" $0 } | |
matchesAny($0) { matched = matched "" RS "" $0 } | |
0 == length(PATT) { exit } | |
END { system(length(PATT) ? "date >&2" : "true"); printf(length(PATT) ? "Seen " NR " lines since " START "\n" : "") > "/dev/stderr"; print(length(PATT) ? allLines : matched); exit(length(PATT)) } |
OlderNewer