How to reset a folder to specific revision in GIT


After spent a valuable time to understand a bug, I realized the problem was a code reformat that I performed in my InteliJ Idea and i had to rollback just one folder inside the same repository and set it to a specific revision and after try a lot of possible solutions I think it is the best.

Register a alias to to all job for you

Then just try

or for whole repository


How check trace log in Flash Apps in Mac OS X


Sometimes we need to change some legacy Flash/Flex and we need to debug the stack trace exception. Yeah! Flash player has a log file where you can check all log entries from your SWF.


  1. Go to:
  2. Scroll down the page to find the latest “Flash Player…Projector content debugger” for the platform you are working on. E.g. I use “Download the Macintosh Flash Player 11.5 Projector content debugger (ZIP, 15.24MB)”
  3. Click that link to download the stand-alone FP Debugger.
  4. Copy the executable (.app on Mac, .exe on Windows, etc) to the location of your choice.

Locating your mm.cfg

In Mac OS X it should be in /Library/Application Support/Macromedia/mm.cfg or in your home ~/ folder and just add this

Locating your flashlog.txt

Just tail ~/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt.

HOWTO Apache redirect URLs


Another common issue on DevOps is how make redirections using Apache HTTP and in fact it is very simple.

It will send a Temporary Redirect (302) for your browser containing the new URL to you browser access immediately, but you also can specify a redirection status.

I hope you have fun 😉

HOWTO detect if JDK 1.6 is available on Mac OS X El Capitán


If you need for any reason use JDK 1.6 in Mac OS X El Capitán (Yosemite too), you should use this very useful command.

If it returns blank you don’t have it and you may need install XCode or take a look on this article.

Thanks Irfan Durmus (@irfandurmus)!

HOWTO protect your Servlet container using Apache as reverse proxy


Another they in DevOps hell you probably will need to activate a Java EE container and definitely is a bad idea expose it directly on Internet because security issues about the container (your application security issues still must be handled by you).

One elegant and easy way to keep it secured is access your container behind a reverse proxy and today I will talk about Apache HTTP Server.

To publish your Tomcat running on same Apache’s host you just have to:

You can use your Apache to access remote hosts keeping your apps in same SSL certificate for example (and save a few bucks 🙂 )

And you also can use it to load balance your request, but I will talk about it in another post 😉

HOWTO install SpringBoot app as Linux service


Last 6 months I am dedicating some time to understand Spring Boot (I promise 🙂 to publish some tutorials by my self soon) and  migrated an application from Tomcat to a micro service application and imagine a man satisfied with the result 😛

1st Configure your build script to build a executable JAR file #blackmagic #fromhell 



Fully executable jars work by embedding an extra script at the front of the file. Not all tools currently accept this format so you may not always be able to use this technique.

2nd  Copy your jar file to a service folder

3rd Make it executable

When you run your application service your application keep PID file and log file as follows

  • Tracks application’s PID using /var/run/<appname>/<appname>.pid
  • Writes console logs to /var/log/<appname>.log

4th Create a symbolic link in /etc/init.d

5th Set your service run levels

It will run all your application, including Tomcat 😀 without any crazy script and workarounds to make it run smoothly.

HOWTO compile PO files to update i18n PHP translations in MAC OS X


Another topic that punch our stomach every time we need to update a Theme in WordPresscompile PO files to update language resources for PHP GNU GetText support.

1st you need to install gettext using Brew;

2nd edit your PO file;


3rd compile it;

If you don’t have PO file available BUT you have the MO (binary/compiled PO) please just get it.


HOWTO install Oracle JDK 8 in Ubuntu


Hey folks!

I know many people doesn’t like to use OpenJDK in Ubuntu (default JDK embedded in many others Linux distros) and every time I need it I have to download from Oracle, upload to my server, untar, setup bash, blah blah blah.

Here a quick guide to use Webupd8team Java PPA ubuntu repository and make your life more simple and happy.

Thanks to this post.

How cache GIT credentials


For many times working with GIT you probably got this problem: how cache my credentials? So, we have different solutions for each operational system because git respect each OS security architecture.


In Mac you must have credential-oskeychain and I usually install it using brew.


Turn on the credential helper so that Git will save your password in memory for some time. By default, Git will cache your password for 15 minutes.

To set a different time please try


If you prefer working with the command line, you can also install a native Git shell, such as Git for Windows. With Git for Windows, running the following in the command line will store your credentials: