25 July 2012

rsync to copy only new files

copy only new files (keep old files on server) to server.
rsync -avz -e 'ssh -i id_rsa' from/* server:~/to/
for just printing, not executing, of what it will do
-avzn

notes
  • works with local folders as well
  • auto create folder for you, no need mkdir

23 July 2012

bash script: copy to server, files that are modified today

(all in one line)

find * -mtime 0 -printf "%p " | 
awk '{print "scp -i sshid "$0" user@hostname:/path"}' | sh

copy files modified after 13 days ago
find * -mtime -13 -printf "%p " | awk '{print "cp -p "$0" ~/folder "}' | sh

20 July 2012

editing mov files in virtualdub

to be installed:
x264: x264vfw_37_2200bm_33968.exe
xvid: Xvid-1.3.2-20110601.exe
ffdshow: ffdshow_rev4422_20120409.exe
virtualdub quicktime plugin: Quicktime_VD_v0.2.0.0_bin.zip (place .vdplugin in plugins and edit Quicktime.ini line to Mode=2)
Apple Quicktime
avisynth


create a file.avs:
make sure you write the full path!!
DirectShowSource("c:\locationto\video.mov")

You can now open a .mov file in virtual dub. (ぱちぱち)
For compression, I currently use xvid, which converts a 22 minutes-ish .mov 1.9Gb video file to a 361mb .avi (resolution is 640x480).

Any Video Converter is a good encoder, though it has a suspicious name... but i need more compression, virtualdub may do it... i guess.

source

17 July 2012

valgrind

there are times when the code works in mac while it breaks in ubuntu.
munmap_chunk(): invalid pointer
the problem was that i was trying to set a minus array id.
this was found by
valgrind --leak-check=full --memcheck:leak-check=full --show-reachable=yes -v ./programName