Sunday, February 21, 2016

My first android application AutoPrompt :)

It has been an year i am riding my bike i always have been worried about my PUC & Insurance date. So i thought of making an android app (AutoPrompt) for it which will keep track of my puc & insurance date for me.
AutoPrompt will also create an calendar event for you based on expiry date. I have published my app on google play store https://goo.gl/P4ayzg you can use it too. you can also like my apps Facebook page https://www.facebook.com/AutoPromptApp/

Thursday, October 30, 2014

Virtualhost config for using wordpress and rails app on same server and under same domain

To host wordpress and rails app on same server you have to install wordpress in public folder of your rails app.

Below config are done by placing "/en/blog" and "/es/blog" in public folder of your rails app which are two wordpress setup in blog folder

      ServerName example.yourdomain.com
      # !!! Be sure to point DocumentRoot to 'public'!
   
      DocumentRoot /var/www/example/public
   
      #RailsEnv production    
   
         # This relaxes Apache security settings.
         AllowOverride all
         # MultiViews must be turned off.
         Options -MultiViews
   
   
   
         PassengerEnabled off
       
           RewriteEngine On
           RewriteBase /es/blog/
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteCond %{REQUEST_FILENAME} !-d
           RewriteRule . /es/blog/index.php [L]
       
   
     
   
         PassengerEnabled off
       
           RewriteEngine On
           RewriteBase /en/blog/
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteCond %{REQUEST_FILENAME} !-d
           RewriteRule . /en/blog/index.php [L]
       
using this you will be able to access your wordpress sites install in folder "/public/es/blog" and "/public/en/blog" by using below urls:-

example.yourdomain.com/en/blog
example.yourdomain.com/es/blog


Happy Coding:)

Tuesday, September 23, 2014

Domain mapping for apache-tomcat-7.0.54 using virtual host

1) Add below host to your server.xml file
    for me it was on /usr/local/apache-tomcat-7.0.54/conf/server.xml  path you might find it on location to which you have install your apache-tomcat-7.0.54

<host appbase="/usr/local/apache-tomcat-7.0.54/webapps/health" autodeploy="true" name="yourdomain.com" unpackwars="true">
<Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
prefix="localhost_access_log." suffix=".txt"
pattern="%h %l %u %t &quot;%r&quot; %s %b" />
</host>

 2) Add your Domain name in host name field
     2.1 appBase is the path from were this host (a virtual server) is going to look for .war files
     2.2 To have our application accessible by hitting @root of the domain yourdomain.com keep your war file name as "ROOT.war"

 3) So when you start your server this will create a folder with your domain name yourdomain.com in below path

  /usr/local/apache-tomcat-7.0.54/conf/Catalina/yourdomain.com

inside which you will find a ROOT folder which has your application
Happy Coding:)

Wednesday, July 24, 2013

using existing AWS elastic beanstalk environment for your application

Aws provides a managed service for deploying application(elastic beanstalk), were in you just have to configure your AWS CLI so that you can use "git aws.push" command to deploy your code to elastic beanstalk environement. Incase you want to use and already setup elastic beanstalk environment you need to follow below steps:-
go into your code source folder
run below commands

 >git init 
   (replace "/home/elasticbeanstalk-cli" path with your machine elasticbeanstalk-cli folder path)

 >sh /home/elasticbeanstalk-cli/AWSDevTools/Linux/AWSDevTools-RepositorySetup.sh

 >git aws.config 
   (This will prompt you to enter the AWS access key, secret Key, and details of the application you’ve just launched from the console)

 that's it now you can do "eb status" and check your elasticbeanstalk configuration are correct or not. "eb status" shows you details about elastic beanstalk environemnt (application name,environment) now you can just use

 >git aws.push 
 to push your code to elasticbeanstalk environment.

Happy Coding:)

Sunday, June 2, 2013

AWS Cloud Computing made easy

            "cloud computing" when i heard these word for first time i thought these is not my cup of tea. i would require lot of experience to get hand on it but now after 2month since our company started using amazon web service(AWS) for deploying ruby on rails projects on cloud it has become easy, the most interesting part i have configured local phpmyadmin to access AWS RDS instance which is a database instance you can think as if a small process running only for database request processing aws itself only give's you normal mysql prompt through which you can fire mysql query i dont know whether amazon know's about it or not instead of using mysql prompt why can't we can use phpmyadmin which is just a php script used for handling mysql databases and getting rid of SQL query's it's really very help full at least for people like me who don't believe in remembering just syntax these was about database.
    now the thing remain is files for which i have configure filezilla to EC2 instance which is a cloud machine which can be start,stop,reboot everything that you can do on your local machine can be done on cloud machine these allows me to control my cloud web application on my local machine which is being running on a cloud machine


Monday, October 15, 2012

V-Voting my 1st wordpress plugin

v-voting is my 1st wordpress plugin which i have developed with the help of nishita she is my good friend and colleague also we got 13 downloads within 1hours of publishing of our wordpress plugin at wordpress.org http://wordpress.org/extend/plugins/v-voting/

Thursday, June 9, 2011

holidays after 3rd year

holidays r just a great time for me bcoz i can try all the think that i want without any interrupt now i am about to my 3rd year project my preference will be a robotics but nowadays i am interested more in electronic circuit bcoz we will be requiring it for our robot