The owner of this blog is currently working on an cheap, open and powerful software defined radio solution called HackRF. This seems to be very exciting.
http://ossmann.blogspot.de/
The owner of this blog is currently working on an cheap, open and powerful software defined radio solution called HackRF. This seems to be very exciting.
http://ossmann.blogspot.de/
This blog gives some wonderful introductions into various applications of math and programming. I highly recommend reading it:
http://jeremykun.wordpress.com/
Ubuntu brings a nice package called “pdftk” for editing pdfs using the command line. This command joins multiple pdfs into a single pdf:
pdftk 1.pdf 2.pdf 3.pdf cat output 123.pdf
Here is another way to join pdf files, that only requires ghostscript:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=123.pdf 1.pdf 2.pdf 3.pdf
Given a set of files, that all end with “.png.jpg”. We want to remove the “.png” from the filename. This can be done using the linux shell pipes and the commandline editor “sed”.
Examine this command: ls * | sed ‘s/\(.*\)png\.\(.*jpg\)/mv & \1\2/’ | sh
The interesting part here is of course sed ‘s/\(.*\)png\.\(.*jpg\)/mv & \1\2/’. The general syntax is “sed ‘s/patternToSubstitue/SubstituteBy/'”.
The result of this command is, that the substring “png.” is removed from all filenames in the current directory. Files that don’t match this pattern are not changed, because the mv command gets the same name as source and target file.
Imagemagick can apply a number of different filters at a time. In combination with the linux pipes it is possible to batch process a huge number of images.
The command below takes all images in the “data” directory and does the following steps:
ls data/ | xargs -I {} convert data/{} -resize 400×300 -colorspace gray -sepia-tone 81% -modulate 100,35,100 -quality 60 {}.jpg
The “dd” tool is very useful for cloning/backing up/erasing partitions and harddrives. However all these tasks take a long time and the “dd” command does not output status messages on the screen. You never know how much time the process will need to complete or how much data has already been processed.
Luckily there is a hidden way to get this information. Get a command prompt and enter the command below. Replace “Process-Id” by the id of the “dd” process, which can be obtained by “ps -A”.
kill -SIGUSR1 Process-Id