Category Archives: commands

These are useful linux commands that I have found while doing stuff. Putting them here so I don’t forget.

Define default values for bash scrip arguments

Note to self: bash is cool!!!! I was made aware that you can define a default value for a variable in the following manner: ${parameter:-word} So if parameter is unset or null, the expression is replaced with the expansion of … Continue reading

Posted in commands | Tagged , , , , | Leave a comment

PDF word statistics in one “looong” line

The paper that I am writing requires some background information about how digital imaging has been related to phenology. For this I have decided to implement an SLR. I am at the point in the SLR process where I have … Continue reading

Posted in commands | Tagged , , , , , , , , , , , , | Leave a comment

R. create a plot with non overlapping labels

The X axis labels were a bit long and they were having trouble fitting into the plot correctly. I tried various solutions: R’s default and maptool’s pointLabel. The first did not really allow me to turn the labels 90 deg … Continue reading

Posted in commands, R | Tagged , , , , , , | Leave a comment

Very Painful EBImage install on Windows

Short Version Follow this to install EBImage Go here to get GTK+. I used this one. Make sure you add the GTK+ “bin” directory to the path. If you have zlib1.dll problems, or any problems regarding the specific dll that is … Continue reading

Posted in commands, R | Tagged , , , , , , , , , | Leave a comment

sshfs: where were you all along :)

Did you know that you could mount a remote directory (any directory accessible to you) through an ssh command? I was reading 16 ultimate ssh hacks by Carla Schroder and found out this little piece of heaven. The command is sshfs. You use … Continue reading

Posted in commands | Tagged , , , , | Leave a comment

Rscript, where were you all along?

One of the things that I did not like about using R was that there was not “easy” way of calling it in a command sort of way. The test part of my R workflow consisted in going into the … Continue reading

Posted in commands, PhD, R | Tagged , , , , , , , , , | Leave a comment

R: Index of an interval of a number in a vector

Try findInterval :). Let me try to explain what I mean with this title. I have a vector of numbers. The numbers represent bin limits. For example c(1,2,3) is a vector that represents 2 bins. The first is [1,2) and … Continue reading

Posted in commands, R | Tagged , , , , , , | Leave a comment

Showing a pretty ascii git branch topology

If you are using git, you should be branching a lot (it’s encouraged when you use git).  If you have lots of branches (more than two:), you might get a bit lost when it comes to determining the relation between branches. … Continue reading

Posted in commands, git | Tagged , , , , , , | Leave a comment

imroi: bloated Matlab commands

I was working with rbbox on my Matlab GUI application to create squares that marked important stuff inside an image.  I recently needed to move away from the rectangle based approach to a polygon based approach.  This meant not using rbbox. … Continue reading

Posted in annotation, commands | Tagged | 7 Comments

git: another way of doing submodules.

Git keeps giving us more.  Today I found out another way of doing submoduling.  It’s kinda strange and probably a bit harder than using submodules (But that might be because I’m not used to it yet).  But it adds to … Continue reading

Posted in commands, git | Tagged | Leave a comment