Thursday, December 4, 2014

Convert and burn mp4/flv/avi to dvd

Converting/burning .mp4 or .flv to dvd

You can do it 'by hand' if you like. First convert the video, pal 16:9 in this case:

Code:

ffmpeg -i input.mp4 -target pal-dvd -aspect 16:9 -ac 2 output.mpg

Then create the dvd structure:


Code:

dvdauthor -t -o dvd --video=pal -f output.mpg

dvdauthor -T -o dvd

and finally create the iso and burn it:

Code:

mkisofs -dvd-video -o output.iso dvd/

growisofs -dvd-compat -Z /dev/sr0=output.iso

                                   

Saturday, November 15, 2014

How to find files with modify time in certain range

find .  -newermt '2013-01-01' ! -newermt '2013-05-01' -print

Thursday, September 25, 2014

Learning Oracle Day 1


Started learning Oracle with big data.

Getting enviroment set up, I am using my machine Centos 6.5
To save me a lot of hassle in installing all required packages for Oracle, I decided to use pre-installed vm from Oracle.
http://www.oracle.com/technetwork/community/developer-vm/index.html
I choose Big Data Lite vm.

Follow this link to install virtual box under Centos:
http://www.if-not-true-then-false.com/2010/install-virtualbox-with-yum-on-fedora-centos-red-hat-rhel/


For now I am using this link to get familiar with SQL:
http://www.w3schools.com/sql/
which has examples  for me to try in real time.

Tuesday, July 15, 2014

Port forwarding






Local port forwarding:



Suppose you have 15.x.x.x address, and want to access 10.x.x.x address.


ryan is the machine that has duel eth cards, can access 10.x.x.x address.



ssh -L 9001:10.2.11.1:22 ryan -N




And then you can access remote address: 10.2.11.1

#ssh -p 9001 root@localhost

#scp -P 9001 root@localhost:file .





Dynamic port forwarding:




Suppose your work doesn't allow you to access facebook.com/youtube.com.

And you have a server at home which has got public IP address to it. And has SSH server installed on that, and you can access it from anywhere. Now you can simply run the below command on your terminal from the work workstation.


$ ssh -D 6868 user@<HOMESERVER_IP>


In your browser, you need to set the SOCKS proxy to 
localhost    6868

Then all traffic will be redirect to your remote homeserver