Skip to content

Instantly share code, notes, and snippets.

View Rpsl's full-sized avatar
😶‍🌫️
i miss coding

Виктор Диктор Rpsl

😶‍🌫️
i miss coding
View GitHub Profile
@Rpsl
Rpsl / terminal.sh
Last active October 10, 2017 09:58
Open iTerm (2.9+) terminal from PhpStorm/WebStorm/Idea ( NativeNeighbourhood plugin ); Raw
cd ~/Library/Application\ Support/WebIde100/NativeNeighbourhood/classes/org/intellij/plugins/nativeNeighbourhood/icons/macosx
echo '#!/bin/sh
#
# !!!This is only for iTerm 2.9 and above!!!
#
# Reveal a directory in the Terminal.
#
# The script takes one argument, the qualified name of a directory.
#
@Rpsl
Rpsl / crop.md
Created November 18, 2019 18:35
ffmpeg crop blank lines

1. Get crop parameters

cropdetect can be used to provide the parameters for the crop filter. In this example the first 90 seconds is skipped and 10 frames are processed:

$ ffmpeg -ss 90 -i input.mp4 -vframes 10 -vf cropdetect -f null -
...
[Parsed_cropdetect_0 @ 0x220cdc0] x1:0 x2:1279 y1:0 y2:719 w:1280 h:720 x:0 y:0 pts:215 t:0.215000 crop=1280:720:0:0
[Parsed_cropdetect_0 @ 0x220cdc0] x1:0 x2:1279 y1:0 y2:719 w:1280 h:720 x:0 y:0 pts:257 t:0.257000 crop=1280:720:0:0
[Parsed_cropdetect_0 @ 0x220cdc0] x1:0 x2:1279 y1:0 y2:719 w:1280 h:720 x:0 y:0 pts:299 t:0.299000 crop=1280:720:0:0
@Rpsl
Rpsl / redis-clean.php
Last active December 2, 2019 10:11
php script for delete keys by pattern from redis cluster
<?php
$hosts = [
'host1:port1',
'host2:port2',
];
foreach($hosts as $host){
list($host, $port) = explode(':', $host);
echo sprintf("-- %s:%d \n", $host, $port);
@Rpsl
Rpsl / README.md
Last active May 31, 2020 10:08
macOS Grafana application via nativefier
@Rpsl
Rpsl / terminal.sh
Last active May 25, 2021 19:28
Open iTerm terminal from PhpStorm ( NativeNeighbourhood plugin );
cd ~/Library/Application\ Support/WebIde70/NativeNeighbourhood/classes/org/intellij/plugins/nativeNeighbourhood/icons/macosx
echo '#!/bin/sh
#
# Reveal a directory in the Terminal.
#
# The script takes one argument, the qualified name of a directory.
#
# Note that the script is necessary because osascript before osx 10.4 could not
# pass arguments.