Skip to content

Instantly share code, notes, and snippets.

@abjdiat
abjdiat / sfv-verifier
Last active December 28, 2022 18:13
Python Script to check SVF files integrity
#!/usr/bin/env python
##this script was written by [email protected] , feel free to modify it but mention the author, thank you
import zlib,sys,os.path
##this function calculates CRC of a fileName
file_to_check=sys.argv[1]
file_path=os.path.dirname(file_to_check)
def crc(fileName):
prev=0
global file_path
##for the script to work on any sfv file no matter where it's located , we have to parse the absolute path of each file within sfv
@abjdiat
abjdiat / _simple_http_server
Created August 29, 2013 21:16
Simple HTTP Server With Upload , the author of this script is bones7456
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@abjdiat
abjdiat / ps3_sub
Last active December 21, 2015 23:38
PS3 Friendly Arabic Subs Converter Perl script to convert UTF-8 encoded Arabic subtitles to Ps3-Friendly format for scn shots and examples ,visit http://abjdiaty.blogspot.com/2012/01/ps3-friendly-arabic-subs-converter.html
#!/usr/bin/perl
#changelog http://abjdiaty.blogspot.com/2012/01/ps3-friendly-arabic-subs-converter.html
#email [email protected]
use utf8;
no warnings;
open IN, "<:encoding(utf-8)", $ARGV[0];
open OUT, ">:encoding(utf-8)", temp.srt;
while (<IN>) {
print OUT
}
@abjdiat
abjdiat / sub-extractor
Last active December 13, 2022 20:22
Bash Script To Extract Subtitles From MKV file
#!/usr/bin/bash
nano sub-extractor.sh
###paste the following
filename="$1"
if [[ $filename ]]
then
m=$(mkvinfo $filename|grep 'No EBML head found');
if [[ $m ]];
then echo "This is not a valid mkv file";
else