Wednesday, August 28, 2013

How to Install Ruby on Rails on Ubuntu [SOLVED]

Hello Everyone,

Yesterday I have installed the Ruby on Rails on my Ubuntu 12.04. It is really a fun! I think I should share it!

So following are the steps to install Ruby on Rails on Ubuntu!

1) When you are installing something you should always run the
sudo apt-get update 
This will make sure that we have all packages installed and up to date :)

2) After update you should install RVM ( Ruby Version Manager ) Now, RVM is really a cool unix-like software platform designed to manage multiple installations of Ruby on the same device. You can install RVM using CURL only. So very first, you have to make sure that CURL is installed on your ubuntu.
Just run below command to install CURL
sudo apt-get install curl

Now after CURL you can install RVM with below command
\curl -L https://get.rvm.io | bash -s stable


3) Now you have successfully installed Ruby Version Manager! Now lets install Ruby! But wait, before that have you checked the dependencies for RVM ?  You can check it with below command
rvm requirements
Just resolve the Dependencies :) It is really a painful procedure! but dependencies may vary from user to user! so you have to solve it on your own!

4) Now lets install Ruby! with below command
rvm install 1.9.3 

Now you have installed Ruby! Just tell your machine to use 1.9.3 as default with below command
rvm use 1.9.3 --default

After setting 1.9.3 as default lets get the Ruby gem. RVM now provides a 'rubygems' CLI command which allows you to change the rubygems version for the installed interpreter. In order to install the most recent RubyGems that RVM knows about you can do. Use below command to install 
rvm rubygems current

5) Now we have Ruby installed, all we need to install is Rails! and its dependencies through RubyGems
use below command to install Rails
gem install rails

6) Now finally after installing Rails! you can create your very own application skeleton and start the server!
E.g. rails new path/to/your/new/application
cd path/to/your/new/application
rails server

You are now running Ruby on Rails! :)
I hope it helped you :)


Thanks for reading!

Enjoy & be open
Amit Naik

Monday, August 26, 2013

Happy 22nd anniversary Linux! Celebrating 22 glorious years!

Hello Everyone,

Today is 22nd anniversary of Linux! On this occasion let me share the best video of  'The story of linux'. This is the power of Linux.


Lets celebrate this occasion by downloading your favorite Linux distribution!
There are many linux distributions available. If you want to choose one of them then please go here.



Top 3 are::
1) Linux Mint
2) Ubuntu
3) Debain


Thanks for reading.
Enjoy & Be Open,
Amit Naik

Tuesday, August 20, 2013

New XAMPP security concept [solved]

Hello Everyone,

I have just downloaded the new XAMPP 1.8.0. and got the error at localhost/phpmyadmin

New XAMPP security concept:

Access to the requested object is only available from the local network.

This setting can be configured in the file "httpd-xampp.conf".

If you think this is a server error, please contact the webmaster.

Error 403

localhost


So the solution for this is as follows:

1) Open httpd-xampp.conf which is at /opt/lampp/etc/extra/

2) Find <Directory "/opt/lampp/phpmyadmin">

3) Now just add Require all granted before </Directory>

4) So the code will look like this
    <Directory "/opt/lampp/phpmyadmin">
    AllowOverride AuthConfig Limit
    Order allow,deny
    Allow from all
    Require all granted
   </Directory>

5) Now finally Restart the xampp with this command /opt/lampp/lampp restart

That's it and you are Done!

Found it helpful ? Comment's please :)


Thanks for reading.
Enjoy & Be Open
Amit Naik

Monday, July 15, 2013

Google Map Street View Offroad


Google map! we all are fan of it right ? especially its street view. All you need to do is drag & drop the little yellow fella on map and you are in street view.
Have you ever imagined how it is done ? well, some of you might know that it is done with Google Street view cars. Like this one




Well, please ignore the lady and look at the technology. This street view car is though recording 360° views of streets with a High Quality camera on top of it. Most of the people would say "Meh.. I already know this".
But what about places like jungle, volcano side etc. Can google map able to provide us a street view there ? Answer is YES.

Meet Mr.Chris Fiock who is a Street View Operations Lead at Google (Right) teaching Mr.Jaci Matsuo  (middle)Trekker of Hawaii Forest.

Now with this cool backpack Street view recorder, Google now able to record some of the wildest areas. When I say "wildest" then it means, you can simply walk in mordor with this one.





And there is more of it...Examples are below.

1) Street View Snowmobile




Explore Street View Snowmobile in Google Map click here





2) Street View Trike




Explore Street View Trike in Google map click here





3) Street View Trolley


 Explore Street View Trolley in Google map click here









Coolest part of Google map street view is, it is now open to all. If you are a tourism board, non-profit, government agency, university, research organization or other entity interested in borrowing a Street View Trekker to capture and share imagery from a place you know and care about, please Apply Today.

Thanks for reading! I hope you liked it.
Amit Naik

Thursday, March 7, 2013

Google Chrome's Data Compression Proxy


Hey Guys,

I was just checking the New Google Chrome for Android. It is really a faster android browser.
Infact Google is now comeup with Data Compression Proxy settings.

Now you might think what is Data Compression Proxy?

As per Google this latest Chrome Beta for Android includes an experimental feature to reduce cellular data usage and speed up mobile web browsing,
using proxy servers hosted at Google to optimize website content.

In Google's internal testing, this feature has been shown to reduce data usage by 50% and speed up page load times on cellular networks!

You can also enable this awesome feature.
To enable Data Compression Proxy settings do the following steps in your new Beta Chrome browser.
1) Visit chrome://flags in your browser
2) Select “Enable Data Compression Proxy”
Plain and simple. You are done.

Now after enabling this feature you would be able to reduce overall data usage and speed up the page load times. This feature is performed by Google's massive powerful servers.
Chrome mobile opens a dedicated SPDY connection between your phone and one of the optimization servers running in Google’s datacenters and relays all HTTP requests over this connection.

SPDY for speed

The connection from the mobile device to the proxy runs over SPDY, an optimized protocol for the Web that is supported by Chrome, Firefox and Opera, and is also the basis for the forthcoming HTTP/2.0 standard being developed in the IETF. For more info on SPDY go to open source Chromium Projects SPDY page >> http://www.chromium.org/spdy


Thanks for reading,

Enjoy and Be Open.

Monday, January 21, 2013

PHP BACKDOOR / C99 SHELL


PHP BACKDOOR SCRIPT

Today we will talk about php backdoor ;)

Its nothing but cool php script that we can use in order to

1)      Travel across directories
2)      View files
3)      Edit files
4)      Download files
5)      Delete files
6)      Edit files
7)      Upload files
8)      Execute MySql queries / commands
9)      Bypass mod_security
10)   Permissions to directory/folders
11)   Execute shell commands

In short this is a script which everyone must have. But always remember it’s a hack don’t upload it on your server. If you upload it on any apache server anyone can  play GOD. So don’t forget to remove from server when you are done.
I have uploaded it on my github.



LINK: My GITHUB backdoor script




Thanks for reading.

Enjoy & Be Open

Tuesday, December 18, 2012

Flush drupal cache from code

Hey everyone,

Today I would like to share how to recover a blank drupal website using cache clear. Most of the times we change our websites from one server to another. In drupal when we do that our database tables and files messes the cache settings. But while this is happening in database your websites goes blank or it goes unreachable so in that case you have to run one drupal function which will help you to rebuild the registry, rebuild the menu, rebuild the path.

All you need to do is put the code either on page--front.tpl.php or on page.tpl.php.


<?php
// This will Change query-strings on css/js files to enforce reload for all users. 
  _drupal_flush_css_js(); 

  registry_rebuild();     //To rebuild module data
  drupal_clear_css_cache(); //This will flushes the cached css
  drupal_clear_js_cache(); //This will flushes the cached js
?> 


Remember that do not put this code in any if else condition just put it either on page.tpl.php or on front page of your drupal site. And then hit the URL in any browser. Then our code will get executed. Our code would then flush the js and css for all users. Then it would rebuild the registry of all modules. Then it would clear the css cache and then js cache.
So now this would defiantly bring the drupal site back on its feet. 

Thanks for reading.

Enjoy & Be Open