Sunday, December 11, 2011

sTREAMrIDE Ortel Communications

Recently I am finding some serious advertisement business by Ortel Communications.

Issue is:
If you browse any http website you will find an advertisement pooping up just below the page. The advertisement is not being placed by the website owner, rather it is being added by Ortel or by any malicious program in their system. Following is the code found just below the <body> tag of any web page.

<div id="sTREAMrIDE" class="5"></div><script type="text/javascript" src="http://ui.streamride.net/ui.js"></script>

It is communicating with ui.streamride.net for loading the advertisement.

Following is the whois output:
Whois Server Version 2.0
Domain Name: STREAMRIDE.NET
Registrar: GODADDY.COM, INC.
Whois Server: whois.godaddy.com
Referral URL: http://registrar.godaddy.com
Name Server: NS11.DOMAINCONTROL.COM
Name Server: NS12.DOMAINCONTROL.COM
Status: ok
Updated Date: 25-jul-2011
Creation Date: 05-jul-2010
Expiration Date: 05-jul-2012

Registrant:
Envisage Media
L 60/B Basement
Malviya Nagar
New Delhi, Delhi 110017
I
Registered through: GoDaddy.com, Inc. (http://www.godaddy.com)
Domain Name: STREAMRIDE.NET
Created on: 05-Jul-10
Expires on: 05-Jul-12
Last Updated on: 25-Jul-11

Administrative Contact:
verma, saurav envisagemedia.in@gmail.com
Envisage Media
L 60/B Basement
Malviya Nagar
New Delhi, Delhi 110017
India
+91.9958491323 Fax --

Technical Contact:
verma, saurav envisagemedia.in@gmail.com
Envisage Media
L 60/B Basement
Malviya Nagar
New Delhi, Delhi 110017
India
+91.9958491323 Fax --

Domain servers in listed order:
NS11.DOMAINCONTROL.COM
NS12.DOMAINCONTROL.COM

I have complained this to Ortal, let's see what they are doing for some time. Mean while to be safe from this cheater, I have a small personal solution, which you can follow too.


Solution:

Windows users:
Open file: "C:\windows\system32\drivers\etc\hosts"

Linux users:
Open file: /etc/hosts

Add the following code:
127.0.0.1        streamride.net ui.streamride.net

Save it. From now on, your browser will communicate with your local system and will never be able to find ui.streamride.net/ui.js

This is how I am protecting my self.


Thursday, November 3, 2011

Create Domain(s), Subdomain(s) as Virtual Host on Ubuntu

Step 1:
Open using gedit editor or as u like...
sudo gedit /etc/hosts


Step 2:
Add lines like below:

127.0.0.1         localhost
127.0.0.1         mydomain.dev www.mydomain.dev

Now save the file.


Step 3:
Open...

sudo gedit /etc/apache2/httpd.conf

Add the following peace of code:

NameVirtualHost *:80
<VirtualHost mydomain.dev:80>
     ServerName www.mydomain.dev
     ServerAlias mydomain.dev *.mydomain.dev
     DocumentRoot /home/my_user_dir/www
</VirtualHost>

Save the file and restart apache.
Test using your favorite web browser with your vertual domain link i.e. http://mydomain.dev
To restart apache use the following command sudo /etc/init.d/apache2 {start | stop | restart | status}
If you want the sites to be available and enabled to the world, look the following directories:

/etc/apache2/sites-available

This contains configuration files for sites which are available but not necessarily enabled.

/etc/apache2/sites-enabled

This directory contains site files which are enabled.

Example: www.mydomain.com (file inside /etc/apache2/sites-enabled/)
<VirtualHost *:80>
     ServerAdmin webmaster@mydomain.com
     ServerName  www.mydomain.com
     ServerAlias mydomain.com

     DocumentRoot /home/my_user_dir/www/www.mydomain.com
     <Directory />
          Options FollowSymLinks
          AllowOverride None
     </Directory>
     <Directory /home/my_user_dir/www/www.mydomain.com/>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride None
          Order allow,deny
          allow from all
     </Directory>

     ScriptAlias /cgi-bin/ /home/my_user_dir/www/www.mydomain.com/cgi-bin/
     <Directory "/usr/lib/cgi-bin">
          AllowOverride None
          Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
          Order allow,deny
          Allow from all
     </Directory>

     ErrorLog /home/my_user_dir/www/www.mydomain.com/error.log

     # Possible values include: debug, info, notice, warn, error, crit,
     # alert, emerg.
     LogLevel warn

     CustomLog /home/my_user_dir/www/www.mydomain.com/access.log combined

     Alias /doc/ "/usr/share/doc/"
     <Directory "/usr/share/doc/">
          Options Indexes MultiViews FollowSymLinks
          AllowOverride None
          Order deny,allow
          Deny from all
          Allow from 127.0.0.0/255.0.0.0 ::1/128
     </Directory>

</VirtualHost>

You need to save the file and restart apache2, for the changes to be reflected.

Tuesday, October 18, 2011

Get TextMate Features And Styles In Gedit With GMate

GMate is a collection of plugins, themes/styles and other improvements to get TextMate like features in Gedit.

To install GMate in Ubuntu, use the following commands:

sudo apt-add-repository ppa:ubuntu-on-rails/ppa
sudo apt-get update
sudo apt-get install gedit-gmate

This package will not replace Gedit! It will only add some themes and plugins you can enable/disable from the Gedit preferences.

For more info and other Linux distributions installation instructions, see https://github.com/gmate/gmate#readme


Tuesday, October 11, 2011

Uninitialized MySQL Constant Fix For Rails 3

If you’re doing local Rails development and are attempting to setup a database using MySQL (specifically, MySQL2) and you keep getting:

rake aborted!
uninitialized constant Mysql2

Here’s the fix to the problem:

From within the directory of your application, issue:

$ gem uninstall mysql2
$ gem install mysql2 

This will make sure that you’re running the most recent version of the gem.

Next, update your Gemfile. Comment out the default SQLite reference and add a line for MySQL:

#gem 'sqlite3'
#gem 'mysql2'

Save the file and finally, rake your database:

$ rake db:create

And that should take care of it.


Sunday, January 30, 2011

NetBeans IDE and Dark Theme

I've been trying to get NetBeans IDE to work with a Dark Theme for a while, and I finally found something of my use.

Get the following files:
  1. Download NimROD Look And Feel
  2. Download Night.theme
Follow these simple steps:
  1. Copy those files (nimrodlf-1.2.jar, Night.theme) inside a directory "MyNBTheme" or as u like. Place it inside NetBeans folder (C:/Program Files/NetBeans  6.9.1/MyNBTheme).
  2. Create a new shortcut for netbeans.exe found inside C:/Program Files/NetBeans  6.9.1/bin/
  3. Right click on the shortcut; go to Properties; edit the Target field as the following: "C:\Program Files\NetBeans 6.9.1\bin\netbeans.exe" -cp:p "C:/Program Files/NetBeans 6.9.1/MyNBTheme/nimrodlf-1.2.jar" --laf com.nilo.plaf.nimrod.NimRODLookAndFeel -J-Dnimrodlf.themeFile="C:/Program Files/NetBeans 6.9.1/MyNBTheme/Night.theme"
  4. Press OK
  5. Start your NetBeans IDE with the new shortcut just created.
  6. Inside IDE go to Tools -> Options -> Fonts & Colors; and select "Norway Today" as editor theme.
Thanks and enjoy.