Change Default Country on Google Apps (even free edition)

Change Default Country In Google Apps
 
 
Once your default country is selected in your Google Apps account you cannot change it. Sometime it becomes necessary to change the default country for eg: when you change your country.
 
To force the change follow the steps below:
Login to your Google Apps as an administrator.
In your dashboard you'll see "Try Google Apps for Business Free".
Click that link.
After that you'll get option to change the country.
Select your desire country and click 'Begin Trial'. Don't worry, we don't have to pay any buck.
After this you'll reach to Google Checkout Page. At this moment close your browser. Yes close it.
 
Verify if your change has been saved by going to Domain Setting — Account Information — Default Country
 

Kaspersky 2012: download link

 

for the 2013, go here

Internet Secutirity

http://usa.kaspersky.com/files/?file=kis&lang=en&ver=2013&trial=y&pn=Downloads+%7C+Free+Trials+%7C+Home+User+%7C+-+Thanks

 

Go here (2012):

Anti-Virus

http://usa.kaspersky.com/files/?file=kav&lang=en&ver=2012&trial=y&pn=Downloads+%7C+Free+Trials+%7C+Home+User+%7C+-+Thanks

Facebook: Creating your first APP in PHP

So you finally decided you want to create a Facebook app to make your million dollar idea pay off a million dollars! Great!

 

Cutting to the chase:

 

1. Install the Developers App so you can get started creating apps on Facebook.

https://developers.facebook.com/

and click Allow

2. Create and Configure your App

Click on Apps and then "Create New App"

Configure your App

 

3. Download the SDK

Get the PHP SDK here

https://developers.facebook.com/docs/reference/php/

Extract the contents to a /facebook/ folder in your public html folder on your server

 

 

4. Create your minimum App (Who needs a Hello World?)

TO-DO

5. Enhance your App

TO-DO

6. Make it work outside Facebook

TO-DO

7. Make a mobile version

TO-DO

8. Make millions

TO-DO

9. Send me stuff 🙂

 

 

Code:: css-form

I just started a Google Code hosted project since I'm always in need of pretty forms for my HTML things.

Let me know if you want/can contribute to it. It's currently licensed under GPL 2.0

Here's the address:

http://code.google.com/p/css-form

 

 

Why:

  • I want to keep my css/javascript/html 5 knowledge current

LAMP: Installing PECL HTTP

 

 

Enable the pecl command:

# apt-get install libmagic-dev

Install curl support

# apt-get install libcurl3

 

# pecl install pecl_http
 

pecl downloads and compiles. Follow the prompts and if any development library is not available, just use apt-get to install it.

After pecl is done, just add "extension=http.so" to php.ini and restart apache.

Brighter LAMP: phpmyadmin installation

Install mcrypy for phpmyadmin dependencies:

 

# apt-get install php5-mcrypt

 

Now you need to restart apache for the changes to take effect

 

# /etc/init.d/apache2 restart

 

Now, on to the installation:

# apt-get install phpmyadmin

 

Choose Apache2 when you're prompted

 

 

Answer yes to Configure database for phpmyadmin with dbconfig-common?

 

 

after that,

 

Configure phpmyadmin

 

su – httpd

cd domains/

cd ~domains/debian.portnumber53.local/html

(Create the directory if it doesn't exist)

$ ln -s /usr/share/phpmyadmin .phpMyAdmin

 

 

 

nano /etc/phpmyadmin/config.inc.php

$cfg[‘blowfish_secret’] = ''; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */

 

 

 

# nano /etc/php5/conf.d/suhosin.ini

Edit the following, keeping in mind that suhosin values may cause issues with some operations

suhosin.request.max_vars 2048
suhosin.request.max_value_length 1000000
suhosin.request.max_array_index_length 256
suhosin.request.max_totalname_length 8192
suhosin.post.max_vars 2048
suhosin.post.max_array_index_length 256
suhosin.post.max_totalname_length 8192
suhosin.post.max_value_length 1000000
suhosin.sql.bailout_on_error Off
suhosin.log.file 0
suhosin.log.phpscript 0
suhosin.log.phpscript.is_safe Off
suhosin.log.sapi 0
suhosin.log.script 0
suhosin.log.use-x-forwarded-for Off

 

 

Disable the warning

 

# nano /etc/phpmyadmin/config.inc.php

$cfg[‘SuhosinDisableWarning’] = true;

 

Setting up a Debian box for development: making a LAMP: php5

Now P for PHP 5:

 

# apt-get install php5 php-pear php5-suhosin

 

# nano /etc/php5/apache2/php.ini

 

max_execution_time = 30
memory_limit = 64M
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
display_errors = Off
log_errors = On
error_log = /var/log/php.log
register_globals = Off

 

Add mysql support.

# apt-get install php5-mysql

 

 

 

Setting up a Debian box for development: making a LAMP: mysql

Let's make a lamp

 

First M for Mysql:

# apt-get install mysql-server

The script will ask you to define the password for the root mysql user:

Secure your mysql installation:

# mysql_secure_installation

 

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MySQL
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MySQL to secure it, we'll need the current
password for the root user.  If you've just installed MySQL, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):
OK, successfully used password, moving on…

Setting the root password ensures that nobody can log into the MySQL
root user without the proper authorisation.

You already have a root password set, so you can safely answer 'n'.

Change the root password? [Y/n] n
 … skipping.

By default, a MySQL installation has an anonymous user, allowing anyone
to log into MySQL without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] y
 … Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] y
 … Success!

By default, MySQL comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.

Remove test database and access to it? [Y/n] y
 – Dropping test database…
ERROR 1008 (HY000) at line 1: Can't drop database 'test'; database doesn't exist
 … Failed!  Not critical, keep moving…
 – Removing privileges on test database…
 … Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] y
 … Success!

Cleaning up…

All done!  If you've completed all of the above steps, your MySQL
installation should now be secure.

Thanks for using MySQL!
 

 

Setting up a Debian box for development: making a LAMP: apache2

Add a user for the web stuff

# adduser httpd

Choose a simple (but secure) password.

# apt-get install apache2
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following extra packages will be installed:
  apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom
The following NEW packages will be installed:
  apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1
  libaprutil1-dbd-sqlite3 libaprutil1-ldap
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 2,155 kB of archives.
After this operation, 7,266 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://ftp.us.debian.org/debian/ squeeze/main libapr1 amd64 1.4.2-6+squeeze3 [94.2 kB]
Get:2 http://ftp.us.debian.org/debian/ squeeze/main libaprutil1 amd64 1.3.9+dfsg-5 [92.3 kB]
Get:3 http://ftp.us.debian.org/debian/ squeeze/main libaprutil1-dbd-sqlite3 amd64 1.3.9+dfsg-5 [28.1 kB]
Get:4 http://ftp.us.debian.org/debian/ squeeze/main libaprutil1-ldap amd64 1.3.9+dfsg-5 [25.7 kB]
Get:5 http://ftp.us.debian.org/debian/ squeeze/main apache2.2-bin amd64 2.2.16-6+squeeze4 [1,439 kB]
Get:6 http://ftp.us.debian.org/debian/ squeeze/main apache2-utils amd64 2.2.16-6+squeeze4 [164 kB]
Get:7 http://ftp.us.debian.org/debian/ squeeze/main apache2.2-common amd64 2.2.16-6+squeeze4 [308 kB]
Get:8 http://ftp.us.debian.org/debian/ squeeze/main apache2-mpm-worker amd64 2.2.16-6+squeeze4 [2,240 B]
Get:9 http://ftp.us.debian.org/debian/ squeeze/main apache2 amd64 2.2.16-6+squeeze4 [1,396 B]
Fetched 2,155 kB in 5s (423 kB/s)
Selecting previously deselected package libapr1.
(Reading database … 32742 files and directories currently installed.)
Unpacking libapr1 (from …/libapr1_1.4.2-6+squeeze3_amd64.deb) …
Selecting previously deselected package libaprutil1.
Unpacking libaprutil1 (from …/libaprutil1_1.3.9+dfsg-5_amd64.deb) …
Selecting previously deselected package libaprutil1-dbd-sqlite3.
Unpacking libaprutil1-dbd-sqlite3 (from …/libaprutil1-dbd-sqlite3_1.3.9+dfsg-5_amd64.deb) …
Selecting previously deselected package libaprutil1-ldap.
Unpacking libaprutil1-ldap (from …/libaprutil1-ldap_1.3.9+dfsg-5_amd64.deb) …
Selecting previously deselected package apache2.2-bin.
Unpacking apache2.2-bin (from …/apache2.2-bin_2.2.16-6+squeeze4_amd64.deb) …
Selecting previously deselected package apache2-utils.
Unpacking apache2-utils (from …/apache2-utils_2.2.16-6+squeeze4_amd64.deb) …
Selecting previously deselected package apache2.2-common.
Unpacking apache2.2-common (from …/apache2.2-common_2.2.16-6+squeeze4_amd64.deb) …
Selecting previously deselected package apache2-mpm-worker.
Unpacking apache2-mpm-worker (from …/apache2-mpm-worker_2.2.16-6+squeeze4_amd64.deb) …
Selecting previously deselected package apache2.
Unpacking apache2 (from …/apache2_2.2.16-6+squeeze4_amd64.deb) …
Processing triggers for man-db …
Setting up libapr1 (1.4.2-6+squeeze3) …
Setting up libaprutil1 (1.3.9+dfsg-5) …
Setting up libaprutil1-dbd-sqlite3 (1.3.9+dfsg-5) …
Setting up libaprutil1-ldap (1.3.9+dfsg-5) …
Setting up apache2.2-bin (2.2.16-6+squeeze4) …
Setting up apache2-utils (2.2.16-6+squeeze4) …
Setting up apache2.2-common (2.2.16-6+squeeze4) …
Enabling site default.
Enabling module alias.
Enabling module autoindex.
Enabling module dir.
Enabling module env.
Enabling module mime.
Enabling module negotiation.
Enabling module setenvif.
Enabling module status.
Enabling module auth_basic.
Enabling module deflate.
Enabling module authz_default.
Enabling module authz_user.
Enabling module authz_groupfile.
Enabling module authn_file.
Enabling module authz_host.
Enabling module reqtimeout.
Setting up apache2-mpm-worker (2.2.16-6+squeeze4) …
Starting web server: apache2.
Setting up apache2 (2.2.16-6+squeeze4) …

# a2enmod rewrite
Enabling module rewrite.
Run '/etc/init.d/apache2 restart' to activate new configuration!

# nano /etc/apache2/envvars

export APACHE_RUN_USER=httpd
export APACHE_RUN_GROUP=httpd

We will activate the Mass Hosting module for Apache so we can develop a bunch of projects at the same time

We need a file to correct the value of DOCUMENT_ROOT when using such module:

<?php

// Let's fix the document root because of a bug in Apache's mod_vhost_alias not
// setting up the correct $_SERVER[‘DOCUMENT_ROOT’] env variable.
$__mod_vhost_alias_fix_doc_root = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'domains' . DIRECTORY_SEPARATOR . $_SERVER[‘HTTP_HOST’] . DIRECTORY_SEPARATOR . 'html';

if (is_dir($__mod_vhost_alias_fix_doc_root)) {
$_SERVER[‘__MOD_VHOST_FIX_OLD_DOCUMENT_ROOT’] = $_SERVER[‘DOCUMENT_ROOT’];
    $_SERVER[‘DOCUMENT_ROOT’] = $__mod_vhost_alias_fix_doc_root;
}

?>

We create a configuration file for virtual hosts:

nano /etc/apache2/sites-available/vhosts
# get the server name from the Host: header
UseCanonicalName Off

# splittable logs
LogFormat "%{Host}i %h %l %u %t \"%r\" %s %b" vcommon
CustomLog ${APACHE_LOG_DIR}/access_log vcommon

<Directory /home/httpd/domains/portnumber53.local/html>
# ExecCGI is needed here because we can't force
# CGI execution in the way that ScriptAlias does
Options FollowSymLinks ExecCGI
</Directory>

# now for the hard bit

RewriteEngine On

# a ServerName derived from a Host: header may be any case at all
RewriteMap lowercase int:tolower

## deal with normal documents first:
# allow Alias /icons/ to work – repeat for other aliases
RewriteCond %{REQUEST_URI} !^/icons/
# allow CGIs to work
RewriteCond %{REQUEST_URI} !^/cgi-bin/
# do the magic
RewriteRule ^/(.*)$ /home/httpd/domains/${lowercase:%{SERVER_NAME}}/html/$1

## and now deal with CGIs – we have to force a MIME type
RewriteCond %{REQUEST_URI} ^/cgi-bin/
RewriteRule ^/(.*)$ /home/httpd/domains/${lowercase:%{SERVER_NAME}}/cgi-bin/$1 [T=application/x-httpd-cgi]

# that's it!
a2ensite vhosts
a2dissite default
///////////////
mkdir -p /home/httpd/domains/portnumber53.local/html
echo "PortNumber53.local<?php phpinfo(); ?>" > /home/httpd/domains/portnumber53.local/html/index.php

mkdir -p /home/httpd/domains/example.local/html
echo "Example.local<?php phpinfo(); ?>" > /home/httpd/domains/example.local/html/index.php

Let's restart Apache:
service apache2 restart

As long as your windows box solves portnumber53.local and example.local to the IP of your debian web box, try opening these domains in your browser.

 

Setting up a Debian box for development: linux installation

This will be a work in progress series of posts to help people get into the amazing world of developing applications on the web.

Will also give me opportunity to fine tune my knowledge.

 

This will be the L in LAMP, here we go:

 

1. Download a Debian ISO file (6.0.4 has just been release as of this writing)

2. Download LinuxLive USB Creator from http://www.linuxliveusb.com/

3. Run LiLi and create a bootable USB stick with the ISO file you downloaded from Debian website

Choose to format the key in FAT32

 

After following a default installation procedure…. so we're all starting from the same page.

install a few packages:

 

# apt-get update

# apt-get upgrade –show-upgraded

# apt-get install aptitude

# aptitude install sudo rsync