Quick Note: When you’re bash scripting and you need to pipe some text into some process, you can use echo
with the -n
flag to suppress the echo
‘s complimentary endline , or you can use printf
, but using printf
is more portable. Some machines implement echo
differently and don’t support the -n
flag. I found this advice and a longer explanation at this message board.
Tag Archives: OS X
Installing gstat for R on a Mac
I got the following error when trying to use install.packages("gstat")
today,
> install.packages("gstat") package ‘gstat’ is available as a source package but not as a binary Warning in install.packages : package ‘gstat’ is not available (for R version 3.1.1)
Working with hdiutil
This is more of a personal note regarding the hdiutil
tool.
- To create a sparse image:
$ hdiutil create NAME -volname NAME -type SPARSE -fs hfs+j
- To mount the drive:
$ hdiutil attach NAME.sparseimage
- To add data to the drive:
$ mv data.txt /Volumes/NAME
- To unmount the drive:
$ hdiutil detach /Volumes/NAME
Then, if we delete the NAME.sparseimage
file, it’s gone forever and ever.
Using the GNU Scientific Library on a Mac
This morning I installed, compiled, and ran a simple example program using the GNU Scientific Library. This took me a while to figure out, so I’ll share the process here. I am assuming that the reader, like the author, has only vague familiarity with C.
Getting Started on a Mac
In this post I’ll talk about how to set up your Scipy stack on a Mac, and make some recommendations for other tools: Homebrew for general package management, iTerm2 for a terminal, Solarized for a text editing color scheme, and pathogen for vim package management.