Rabu, 25 November 2015

Homebrew is the Best Thing EVERRR!!!

Well, indeed perhaps the title is a bit too enthusiastic.... :-)

But, installing things are so so easy. Especially Hadoop. Not the pain it used to be when I was on Windows, which despite being an excellent operating system, does not work quite as well with some open-source stuff.

Without further ado, here's how to install Homebrew. Obviously, you type this into the Terminal:
ruby -e “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”

With brew installed, you could install maven like this:
brew install maven
Just to see what would happen (but curiosity is the mother of learning, isn't it), I typed:
brew install hadoop
And it worked! Just like that.


Oh, and should you happen to read this post, please forgive my naive enthusiasm. :-)

Rabu, 29 April 2015

Decompiling .chm Into .html

Here's how to decompile a .chm into .html - from the command line:

hh -decompile test sample.chm

The result is the decompiled .html pages of the file sample.chm in the folder test.

Senin, 30 Maret 2015

How to Enable Proxy Access to R, When You are Behind a Particularly Fussy Proxy Provider

Yes, I am calling my proxy provider fussy. Yes, perhaps it is not to blame, even though I strongly suspect it is. It requires double authentication for each time we access the Internet, and for some applications, it requires me to input my credentials four times. Yes, four.

Anyway, when you are working in an organization, such as school, it might be the situation that you are behind a proxy. However you might feel about it, here's one way to enable web access from R that works for me. I use RStudio, but I think this might work for R-Gui, too.


1. Create a .Renviron file, which contains the following lines:

options(internet.info = 0)
http_proxy=http://your_proxy_address:port_number/
http_proxy_user=ask

Save the .Renviron file in your "Documents" or "My Documents" folder. I know, it is a somewhat weird place to put it. There's a discussion about it here.

2. Check that the http_proxy variable is already read by R, by issuing, in R Studio:

Sys.getenv("http_proxy")

If it works, R should return a string which contains your proxy address.

3. Make sure, in R Studio, that Tools > Global Options > Packages > Use Internet Explorer library / proxy for HTTP is unchecked.

4. Restart your R Studio. Now you can (hopefully) access the Internet from R!