Rahul's Tech Blog

Growth Hacking, Just Hacking or No hacking !!!

Hello World JNI program in NDK using

  Create new android application Create a new native method public native String nativeFunction(); Then run this command from inside /app/src/main javah -d jni -classpath /Applications/adt-20140624/sdk/platforms/android-19/android.jar:../../build/intermediates/classes/debug:/Applications/adt-20140624/sdk/extras/android/support/v7/appcompat/libs/android-support-v4.jar:/Applications/adt-20140624/sdk/extras/android/support/v7/appcompat/libs/android-support-v7-appcompat.jar com.rahulprasad.www.ndksample.MainActivity This will create jni folder inside src This will also create a header file called com_rahulprasad_www_ndksample_MainActivity.h Duplicate the header file as main.c and remove everything except function initialization. Include […]

How to tune apache for maximum performance ?

I started with apache2 because, lets face it, it comes default with ubuntu & mac. If you are wondering “what about windows?”, then this article is not for you, xampanzee ! Before we begin. Shortest way to achieve maximum performance is to use Nginx instead of apache2 Apache is slow because of its age old […]

What to do after git clone a yeoman project ?

When you push a yeoman project to git, it only pushes your scripts and configuration files. It does not push libraries and dependencies. So when you git clone a yeoman project you won’t be having all the files to run the project. If you run grunt command. You will get following output: grunt-cli: The grunt […]

Day2day PHP: URL Scout, Get notified when webpage changes.

I found this old drafted blog entry which I wrote in college, it never made to front page of my blog. Reminds me of my awesome college days Library was completed, views files were not, and its still missing. You wont find a full solution here, but if you could understand the library I don’t […]

How to take argument in PHP CLI script

Suppose you are writing a PHP CLI script and you need to take an argument from command line, how would you do it ? Here is how: Following is a sample program to take a string as argument and reverse it. <?php   // $argc contains number of argument sent. Name of the string is […]

Drupal 7, Installing module throws error. Update manager … to continue, provide your server connection details and ask for FTP details

While installing a module in Drupal 7 you might face this error to continue, provide your server connection details It happens when apache (or any other webserver that you are using) does not have have  permission to write into sites/default and sites/all folder. Just change the ownership (OR permission if required) of these folders and […]

How to run a jar file as administrator in windows

Sometimes application needs administrator privilege during installation. If its an *.exe file, you can easily right click on it and choose “run as Administrator” option. But what if the installer is a *.jar file. To run a jar file as administrator, Run command prompt as administrator first. Start > cmd > right click > run […]

‹ Previous Posts