Skip to content

mplayer change resolution of movie (scale)

mplayer -vf scale=640:480 movie.avi

ESPEN guidelines

view here complete

merge pdf

merge pdf in linux

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=finished.pdf file1.pdf file2.pdf

that is all 😉

stupid way for remove infected files detected by avg

since avg 8.5 for Linux does not come with removal tool for removing infected files
you have to remove it by hand
first scan directory
avgscan /media/disk
it will come with something like that

/media/disk/watan/watan.exe Virus identified Autoit.BM
/media/disk/show/show.exe Virus identified Autoit.BM
/media/disk/ncyrf.bat Virus identified Worm/AutoRun.EQ

copy and paste output into file say example.txt
now run awk to get first field and get output to test.txt
awk '{ print $1 }' example.txt > test.txt
add rm command to beginning of each line by sed
sed -i s/^/"rm -rf "/ test.txt
why not loop …;) fear of accidental removal of important files 🙂
it should be looking like

cat test.txt
rm -rf /media/disk/watan/watan.exe
rm -rf /media/disk/show/show.exe
rm -rf /media/disk/ncyrf.bat

now
sh text .txt
hope that might be helpful

add user to fuse group

for that msg after installing encfs on Centos 5.3
fuse: failed to open /dev/fuse: Permission denied
fuse failed. Common problems:
- fuse kernel module not installed (modprobe fuse)
- invalid options -- see usage message

add user to group fuse and enjoy
gpasswd -a mohamad fuse

anti arp poisning for linux


arptables -P OUT DROP
arptables -P IN DROP
arptables -A IN -s 192.168.1.1 --source-mac 00:1D:0F:A6:73:20 -j ACCEPT
arptables -A OUT -d 192.168.1.1 --target-mac 00:1D:0F:A6:73:20 -j ACCEPT
arp -s 192.168.1.1 00:1D:0F:A6:73:20

http://abulmagd.blogspot.com/2008/08/arptables-and-arp-poisoningnetcut.html

for printing reverse string using perl

i have seen it as antispam tool
example

[mohamad@localhost ~]$ perl -e '$mail = reverse("nmoc.liam@liame_ruoy"); print $mail;'
your_email@mail.com
[mohamad@localhost ~]$

nc file transfere

at receiver machine .. make it listen to any port .. say 12345
nc -l -p 12345 > file_to_be_recieved.file
at sender part
nc Reciever_ip_address 12345 < file_to_be_send.file
download netcat from here

socat file transfere

download socat from here
or in centos
yum install socat
on receiver side make it “LISTEN” to Specific port ……. better above root permissive port say 12345
socat TCP-LISTEN:12345 /home/mohamad/Recieved_file_directory/file.mp3
on sender side
socat TCP:remote_ip:12345 /home/mohamad/Sender_Directory/file_i_want_to_send.mp3
enjoy the power of command line 😉

disable nav bar from blogger

add the following lines to html file at css section
layout > edit html
#navbar {
height: 0px;
visibility: hidden;
display: none;
}