04 September 2012

Pro Engineer tips

instead of deleting parts which would end up deleting the parts we'd like to save, suppressing the parts little by little can resolve this problem.
BUT. you cannot edit the file further.

remember to save first the assembly, with file->backup

when reopening there will be error, but can be fixed by using freeze.

29 August 2012

ssh-add

has to login to server using id_rsa and passphrase --> takes too much time
to shorten this:
ssh-add ~/.ssh/id_rsa
ubuntu will remember your password! yay!

17 August 2012

irc in terminal

sudo apt-get install irssi
irssi

/connect server_name
/join #channel_name
/nick new_nick
/msg user xdcc send number
/window number
/dcc get

10 August 2012

resize and delete exif data

exif data exists
identify -format %[EXIF:DateTime] p.jpg
identify -format %[exif:*] p.jpg 


strip exif files
jhead -purejpg p.jpg 

convert in batch
for i in *jpg; do convert -resize 50% $i s$i; jhead -purejpg s$i; done

03 August 2012

viewing usb raw (usb snifing) in ubuntu karmic

1. check kernel version
uname -r
mine is 2.6.31-14-generic
2. since my kernel is > 2.6.21, I need libpcap 1.1.0
locate libpcap
found out mine is libpcap.so.1.0.0
4. ???

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