This file contains 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
First generate a list of the timestamps of the I-frames: | |
mkvinfo -s input.mkv | grep track\ 1 | grep I\ frame | grep -o -E "[0-9]{1,2}\:[0-9]{1,2}\:[0-9]{1,2}\.[0-9]{3}" > I-frames_stripped.txt | |
Now copy the timestamps you want into another file. | |
Then you can run: | |
mkvmerge --split timecodes:$(cat marks.txt) input.mkv -o input_split.mkv | |
where marks.txt contains your timestamps. |
This file contains 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 | |
FFMPEG="/usr/bin/ffmpeg" | |
SOX="/usr/bin/sox" | |
$FFMPEG -i "$1" -map 0:a -c flac -y temp.flac | |
$SOX temp.flac pitched.flac pitch -500 | |
$FFMPEG -i "$1" -i pitched.flac -map 0:v -map 1:a "${1}"_pitched.mkv | |
rm temp.flac pitched.flac |
This file contains 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
def frame2ts(self, ts): | |
new_ts = ts / 24 | |
new_ts_str = time.strftime('%H:%M:%S', time.gmtime(int(new_ts)))[1:] | |
ms = new_ts % 1 | |
ms = Decimal(ms).quantize(Decimal('.01'), rounding=ROUND_DOWN) | |
new_ts_str += str(ms)[1:] | |
return new_ts_str |
This file contains 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
[clickme] | |
full_text=Click me | |
command=echo hello $BLOCK_BUTTON | |
min_width=button=1 x=1280 y=800 | |
align=left | |
[clickme2] | |
full_text=Click me! | |
command=notify-send "Button $BLOCK_BUTTON ($BLOCK_X, $BLOCK_Y)" |
This file contains 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 | |
if [[ $# < 2 ]] | |
then | |
INTERNAL=tun0 | |
EXTERNAL=eth0 | |
else | |
INTERNAL=$1 | |
EXTERNAL=$2 | |
fi |
This file contains 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 | |
ping -c 1 -W 2 8.8.8.8 2> /dev/null > /dev/null | |
ret=$? | |
if [[ "$ret" -ne "0" ]] | |
then | |
#echo \'<span color=\"red\">Offline</span> \' | |
echo " Offline " | |
else | |
#echo \'<span color=\"green\">Online</span> \' |
This file contains 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 | |
if [[ "$(whoami)" != "root" ]] | |
then | |
echo "Start as root, fag" | |
exit 1 | |
fi | |
echo -n "Starting in 3..." | |
sleep 1 |
This file contains 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
[klaxa@localhost Development]$ cat cassy_tiles.c | |
#include <stdio.h> | |
int main() { | |
for(int x = 0; x < 800; x+=256) { for (int y = 0; y < 480; y+=256) { printf("%dx%d\n", x, y); } } | |
} | |
[klaxa@localhost Development]$ gcc cassy_tiles.c -std=c99 -o cassy_tiles | |
[klaxa@localhost Development]$ ./cassy_tiles | |
0x0 | |
0x256 |
This file contains 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
DEBUG=0 | |
while read line; do | |
mkvinfo "$line" > currentmkvinfo.info | |
currentFontName="" | |
currentFontDigit=1 | |
while read info; do | |
currentLine=`echo $info | sed 's/|//g' | sed 's/+//g'` | |
currentLineText=`echo $currentLine | sed 's/[0-9]//g'` | |
currentLineDigit=`echo $currentLine | sed 's/[a-z]//g' | sed 's/[A-Z]//g' | sed 's/://g'` | |
if [ "$DEBUG" -gt "1" ] |
This file contains 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
Mangatrader Downloader (Centralized) | |
CTRL+C to end at any time | |
Traceback (most recent call last): | |
File "dlc.py", line 157, in <module> | |
url_request = (base64.b64decode("aHR0cDovLzE0Ni4xODUuMTM3LjE5NS9tdC9Eb3dubG9hZFJhbmRvbVNlcmllcw==")).decode("utf-8"); | |
File "/usr/lib/python3.2/base64.py", line 83, in b64decode | |
raise TypeError("expected bytes, not %s" % s.__class__.__name__) | |
TypeError: expected bytes, not str |
NewerOlder