Ubuntu Trick: Out Of Memory When Compiling Source

This shit happens when i tried to compile Phalcon in my Ubuntu server:


...
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
..

Those lines means that my Ubuntu server/desktop demand more GB of RAM to compile. If it happens to you too, here's a trick that i wanna share with you.


Lord Tanamo's "Mother's Choice" Lyrics

Found this classic stuff on youtube:

And it gets me curious about the lyrics

This is what i can interpret so far

If your mother and your wife were drowning
I want to know which one you would be saving
If your mother and your wife were drowning
I want to know which one you would be saving
As for Me, I'm holding onto my mother
And my wife you still have to ask to Lord Tanamo


Multiple JDK in Mac OSX 10.10 Yosemite

It is very common for developers to setup multiple JRE environment. Some developers prefer using VM to install another version of JDK and keeping the default version in their local, but i prefer to install multiple JRE in my local machine. Here's how i do it on my Mac.


Run Some Shell Task in Background

I just found a very useful technique to let your shell do something and you just can leave right away, grab your shoes and go outside.

nohup [ANY SHELL COMMAND] &
For example:
nohup scp user@hostname:~/filename.txt /local/directory &

This will make the output written to nohup.out, instead of directly displaying it in the console. And you can leave it and do another awesome stuff.


How To Remove Empty Field Value From Solr

This is the correct query to delete index from solr which have an empty title value. Example in XML format:

<delete><query>-title: [* TO *]</query></delete>

In CURL

curl http://example.com:8983/solr/collection1/update?wt=json \
    -d "stream.body=<delete><query>-name: [* TO *]</query></delete>"


Updating Toad to Version 1.2.0 on Mac OS Yosemite

Before you upgrade from Toad 1.0 to 1.2.0, please make sure you delete this folder first:

cd ~/Library/Containers/
rm -fR com.dell.Toad

Then install Toad 1.2.0 from App Store.
This will reset all existing connection, and you have to redo all the connection settings.

Done


Octoberfest Semeru

Sore hari sekitar pukul 15:00 berlima, kita sampai di Ranu Pane, desa tertinggi dan terdekat ke Taman Nasional Gunung Semeru. Kita berencana untuk mulai hiking keesokan harinya di pagi hari. Menginap di sebuah bengkel motor di sebelah warung didepan masjid, kita menggelar matras dan sleeping bag kita, bersama sang pemandu dan porter, Cak Manan, sambil mendengarkan kisah-kisah pengalaman pendakian beliau ke berbagai gunung.


Port Forwarding in Mac OS Yosemite

When upgrading to Yosemite (Mac OSX 10.10), be aware that port forwarding using ipfw is no longer supported.
But we can overcome this issue using pf

For example when using Eclipse Tomcat as development server, you may want to forward all the port from 80 to 8080 and 443 to 8443, here's the step:


I found MAGIC!

It was a rainy monday night and i was hangin out with some colleagues enjoying hot chocolate and coffee while suddenly the coffeeship played a reggae music that was quite fresh for my ears. I asked everyone on the table if they recognize the singer, but no one knows. So i listen carefully to the song and google it with small portion of the lyrics (whatever i can capture by my ear). — Note: I tried soundhound before but it didn't work well.


Port Forwarding in Mac OSX Mavericks (Port 80 to 8080 and 443 to 8443)

Some issues when setting up Tomcat server (using SSL) in Eclipse - Mac OS environment is that, Mac limit the port usage permission below 1000 to only root. So Eclipse won't be able to run the tomcat server at port 80 or 443.
This issue can be solved by setting up port forwarding in your Mac OS. Let's open terminal and type something cool.