Saturday, June 28, 2014

Firewall policies , rulesets, straetegy ,chains, iptables

Configure apache 2 using single ip for multiple https websites.

http://www.digicert.com/ssl-support/apache-multiple-ssl-certificates-using-sni.htm
https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-ssl-certificates-on-one-ip-with-apache-on-ubuntu-12-04

Steps 1: install apache2 using command  sudo apt-get install apache2

Steps 2: we should create different certificates for different https websites using openssl.Mainly three files are needed .
 SSLCertificateFile /path/to/www_yoursite_com.crt
 SSLCertificateKeyFile /path/to/www_yoursite_com.key
 SSLCertificateChainFile /path/to/DigiCertCA.crt

use openssl command to create it.
eg. openssl req -days 3650 -nodes -new -x509 -keyout ca.key -out ca.crt -config ./openssl.cnf
Steps 2:  follow steps provided in following link
https://www.digitalocean.com/community/tutorials/how-to-set-up-multiple-ssl-certificates-on-one-ip-with-apache-on-ubuntu-12-04

How To Set Up Multiple SSL Certificates on One IP with Apache on Ubuntu 12.04

You can host multiple SSL certificates on one IP Address using Server Name Indication (SNI).

About SNI

Although hosting several sites on a single virtual private server is not a challenge with the use of virtual hosts, providing separate SSL certificates for each site traditionally required separate IP addresses. The process has recently been simplified through the use of Server Name Indication (SNI), which sends a site visitor the certificate that matches the requested server name.

Note:

SNI can only be used for serving multiple SSL sites from your web server and is not likely to work at all on other daemons, such as mail servers, etc. There are also a small percentage of older web browsers that may still give certificate errors. Wikipedia has an updated list of software that does and does not support this TLS extension.

Set Up

SNI does need to have registered domain names in order to serve the certificates.
The steps in this tutorial require the user to have root privileges. You can see how to set that up in the Initial Server Setup Tutorial in steps 3 and 4.
Apache should already be installed and running on your VPS. If this is not the case, you can download it with this command:
sudo apt-get install apache2

Step One—Create Your SSL Certificates

For the purposes of this tutorial, both certificates will be self-signed. We will be working to create a server that hosts both example.com and example.org.
The SSL certificate has 2 parts main parts: the certificate itself and the public key. To make all of the relevant files easy to access, we should create a directory for each virtual host’s SSL certificate.
mkdir -p /etc/apache2/ssl/example.com
mkdir -p /etc/apache2/ssl/example.org

Step Two— Activate the SSL Module

The next step is to enable SSL on the droplet.
sudo a2enmod ssl
Follow up by restarting Apache.
sudo service apache2 restart

Step Three—Create a Self Signed SSL Certificate

When we request a new certificate, we can specify how long the certificate should remain valid by changing the 365 to the number of days we prefer. As it stands this certificate will expire after one year.
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/example.com/apache.key –out /etc/apache2/ssl/example.com/apache.crt
With this command, we will be both creating the self-signed SSL certificate and the server key that protects it, and placing both of them into the new directory.
This command will prompt terminal to display a lists of fields that need to be filled in.
The most important line is "Common Name". Enter your official domain name here or, if you don't have one yet, your site's IP address.
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:US
State or Province Name (full name) [Some-State]:New York
Locality Name (eg, city) []:NYC
Organization Name (eg, company) [Internet Widgits Pty Ltd]:Awesome Inc
Organizational Unit Name (eg, section) []:Dept of Merriment
Common Name (e.g. server FQDN or YOUR name) []:example.com                  
Email Address []:webmaster@awesomeinc.com
Then go ahead and take the same steps for the second (example.org) domain:
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/apache2/ssl/example.org/apache.key -out /etc/apache2/ssl/example.org/apache.crt

Step Four—Create the Virtual Hosts

Once you have the certificates saved and ready, you can add in your information in the virtual host files.
Although it’s not required, we can create two virtual host files to store virtual host information in separate files, copying the configuration from the default virtual host file.
sudo nano /etc/apache2/sites-available/example.com
sudo nano /etc/apache2/sites-available/example.org
Go ahead and open up each file and paste in the configuration below. This configuration is a simplified version of two separate configuration files: the default virtual server configuration file found at /etc/apache2/sites-available/default and the default SSL configuration located in /etc/apache2/sites-available/default-ssl.
Additionally, this configuration includes an important change that facilitates multiple SSL certificates. Whereas the default SSL configuration has the following line, specifying a certificate as the default one for the server,
<VirtualHost _default_:443>
the configuration below does not have a reference to a default certificate. This is key.
Overall, the default configuration files offer a variety of useful directives and additional configuration options that you can add to the virtual host. However, the following information will provide the server everything it needs to set up multiple SSL certificates on one IP address.
<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName example.com
        DocumentRoot /var/www

</VirtualHost>


<IfModule mod_ssl.c>
<VirtualHost *:443>

        ServerAdmin webmaster@localhost
        ServerName example.com
        DocumentRoot /var/www

        #   SSL Engine Switch:
        #   Enable/Disable SSL for this virtual host.
        SSLEngine on

        #   A self-signed (snakeoil) certificate can be created by installing
        #   the ssl-cert package. See
        #   /usr/share/doc/apache2.2-common/README.Debian.gz for more info.
        #   If both key and certificate are stored in the same file, only the
        #   SSLCertificateFile directive is needed.
        SSLCertificateFile /etc/apache2/ssl/example.com/apache.crt
        SSLCertificateKeyFile /etc/apache2/ssl/example.com/apache.key
</VirtualHost>

</IfModule>
There are a few lines in these configuration files that need to be customized.
  • ServerAdmin: This is simply your webmaster’s email address
  • ServerName: This is your domain name. Make sure that you write it in without a prepended www.
  • DocumentRoot: This is the directory where you keep your site information. Currently it points to the apache default directory. You will probably have different server roots for the 2 different virtual hosts.
  • SSLCertificateFile: This directive points to the location of the certificate file. The certificate for each site is stored in the directory that we created earlier in the tutorial.
  • SSLCertificateKeyFile : This directive points to the location of the certificate key. The certificate key for each site is stored in the directory that we created earlier in the tutorial.
Set up both domains’ configurations. We still have more step before the separate SSL certificates will work on both servers.

Step Five—Edit the ports.conf file

The final step required to make sure that multiple certificates work on one VPS is to tell the server to listen on port 443. Add the bolded line to the apache ports configuration file.
sudo nano /etc/apache2/ports.conf 
NameVirtualHost *:80
NameVirtualHost *:443

Listen 80

<IfModule mod_ssl.c>
    # If you add NameVirtualHost *:443 here, you will also have to change
    # the VirtualHost statement in /etc/apache2/sites-available/default-ssl
    # to 
    # Server Name Indication for SSL named virtual hosts is currently not
    # supported by MSIE on Windows XP.
    Listen 443
</IfModule>

<IfModule mod_gnutls.c>
    Listen 443
</IfModule>

Step Six—Activate the Virtual Hosts

The last step is to activate the hosts. Apache makes activating and deactivating hosts very easy.
sudo a2ensite example.com
sudo a2ensite example.org
(You can deactivate virtual hosts with the command: sudo a2dissite example.com)
With all of the virtual hosts in enabled, restart apache.
sudo service apache2 restart
You should now be able to access both sites, each with its own domain name and SSL certificate.
You can view the sites both with and without the signed SSL certificates by typing in just the domain (eg. example.com or example.org) or the domain with the https prefix (https://example.com or https://example.org).


Thursday, June 26, 2014

Cinema 4D Render tutorials

Quick start
http://intro.maxon.net/index.php?lang=US&&vers=15057
http://http.maxon.net/pub/r13/doc/Quickstart_C4D_R13_US.pdf

Cinema 4D basic animation simulation tags
http://www.youtube.com/watch?v=eh26ERdj8nQ

http://www.creativebloq.com/3d-tips/cinema-4d-tutorials-1232717

Light rendering
http://www.youtube.com/watch?v=p8iTCaA3PI4

https://www.youtube.com/watch?v=v_0ItL7FfS0

http://www.tutorialized.com/tutorials/Cinema-4D/1

Cinema 4D lightinig tutorial
https://www.youtube.com/watch?v=p8iTCaA3PI4
https://www.youtube.com/watch?v=vvWNu_GOW3g

Cinema4D Tutorial: Lighting Part 11 - Volumetric Lighting (Beginning)

https://www.youtube.com/watch?v=6DBKafBDUSk

Cinema 4D linear workflow option for realistic rendering

http://helloluxx.com/tutorials/cinema4d-2/cinema4d-rendering/linear-workflow-in-cinema4d-and-after-effects/

Cinema 4d tutorial : vray lighting, render settings and post production

https://www.youtube.com/watch?v=Iq61FSPGiEw

Building basic structures in cinema 4D
https://www.youtube.com/watch?v=3IRq4ocHXss


Sky Realistic Rendering
http://www.youtube.com/watch?v=UFWIgbhB6vQ

Sky rendering from template
https://www.youtube.com/watch?v=rM9rNjTCoTI

Using predefined materials in cinema 4D in content browser
http://www.lynda.com/CINEMA-4D-tutorials/Using-Content-Browser/307/24320-4.html


global illumination
http://greyscalegorilla.com/blog/tutorials/how-to-use-global-illumination-for-realistic-light-in-cinema-4d/

http://cgi.tutsplus.com/tutorials/global-illumination-techniques-in-cinema4d--cg-7985


Church of light texture

http://www.sketchuptexture.com/2013/05/announcement-sketchup-texture-spring.html
http://www.ronenbekerman.com/making-of-church-of-the-light/

http://tf3dm.com/3d-model/tadao-andos-church-of-the-light-45169.html

http://cgi.tutsplus.com/tutorials/texturing-lighting-rendering-the-church-of-light-in-3ds-max--cg-3675

http://www.sherrylightinganddesign.co.uk/church-lighting.html

http://www.indigorenderer.com/documentation/manual/indigo-cinema-4d/tutorials/getting-started-tutorial

Scene redering cinema 4D
http://www.youtube.com/watch?v=yTYnGWziAw8

Texturing Realistic
http://www.blenderguru.com/tutorials/the-secrets-of-realistic-texturing/#.U8mTY_mSySo

cgtextures
wood for chair
http://www.cgtextures.com/texview.php?id=4944&PHPSESSID=0ig918rslbi0n7s78hea0sitj6

http://www.cgtextures.com/texview.php?id=39136&PHPSESSID=0ig918rslbi0n7s78hea0sitj6

http://www.youtube.com/watch?v=9Bo9VwnfXQI

https://www.youtube.com/watch?v=ysJAAes-_wU

Monday, June 23, 2014

cake php info

learn Joomla 2.5

http://www.youtube.com/watch?v=WW3T2tqFMGQ
http://demo.icetheme.com/?template=it_blackwhite

http://jextensions.com/

>>joomla database
http://docs.joomla.org/Selecting_data_using_JDatabase

>> migrate from typo3 to joomla
http://www.slideshare.net/CMS2CMS/how-to-migrate-from-typo3-to-joomla

play tying car race game

http://play.typeracer.com/?rt=hb5a6s4lwi40

how to develop chat app in android

http://stackoverflow.com/questions/16954712/android-whatsapp-chat-examples

http://developer.samsung.com/android/technical-docs/Building-a-Chat-Application

Steps followed to set up ios app development

1)Created and verified apple id for developers firs from following link
   https://developer.apple.com/register/index.action
>>hello world http://www.youtube.com/watch?v=Y7iHPh7WjlA
>>basic alert view
http://stackoverflow.com/questions/6319417/whats-a-simple-way-to-get-a-text-input-popup-dialog-box-on-an-iphone

>>iphone alert view
http://code.tutsplus.com/tutorials/uialertview--mobile-3159

>>ios text input
http://www.techrepublic.com/blog/software-engineer/how-to-collect-text-input-using-uitextfield/

>>ios TableView
http://stackoverflow.com/questions/13174972/setting-style-of-uitableviewcell-when-using-ios-6-uitableview-dequeuereusablecel
>>refresh table view ios 6
http://stackoverflow.com/questions/15710934/refresh-controller-for-embedded-tableview-ios-6
http://www.youtube.com/watch?v=JGMa3eLGxXQ
http://www.youtube.com/watch?v=JGMa3eLGxXQ

openssl , Certificate revocation list(CLR)

creating own signed certificate authority
https://jamielinux.com/articles/2013/08/generate-certificate-revocation-list-revoke-certificates/
http://www.dylanbeattie.net/docs/openssl_iis_ssl_howto.html

Creating desktop application using web technology using node-webkit

Thursday, June 12, 2014

REST protocols Info

About advantage of caching in  REST protocol
http://odino.org/rest-better-http-cache/

Why caching?

If you aren’t convinced by Fielding’s words, here are other explanations:
  • improve speed, because we want to deliver fast content to our consumer
  • fault tolerance, because we want our service to deliver content also when it encounters internal failures
  • scalability, because the WWW scales to bilions of consumers through hypermedia documents and we just want to do the same thing
  • reduce server load, because we don’t want our servers to compute without the need of it

experiment on core javascript concepts in console.

scope of var in javascript


null != undefined
false
null !!= undefined

SyntaxError: Unexpected token !
null !== undefined
true
null == undefined
true
null === undefined
false
null != undefined
false
null !== undefined
true
!!0
false
!0
true
!1
false
!!1
true
var csss = "444px";
undefined
console.log(css);

ReferenceError: css is not defined
console.log(csss);
444px VM470:2
undefined
console.log(csss.replace("px","rr"));
444rr VM471:2
undefined
csss.replace("px","rr");
"444rr"
csss
"444px"
var evt = "onmousedown";
undefined
evt.length
11
var evt = ["onmousedown"];
undefined
evt.length
1
document["onmousedown"] = function(){alert("a")};
function (){alert("a")}

play famework 1.2.5

binding select option
http://stackoverflow.com/questions/17909837/play-framework-1-2-4-selected-option-for-select-template

templating syntaxes
http://www.playframework.com/documentation/1.2.5/templates

web attacks
https://www.acunetix.com/websitesecurity/cross-site-scripting/

salt authetication
http://howtodoinjava.com/2013/07/22/how-to-generate-secure-password-hash-md5-sha-pbkdf2-bcrypt-examples/




<ul>
#{list items:listWithLists, as:'listWithinList'}
  #{list items:listWithinList, as:'string'}
    <li>${string}</li>
  #{/list}
#{/list}
</ul>

http://stackoverflow.com/questions/14161748/rendering-two-lists-within-groovy-template-for-play-framework-1-2




http://www.youtube.com/watch?v=E0wW9RwpG7M&list=PLtKLBk9xK_E-qZBOaxiD02WmTFhNAt6Bw

for (String item : someList) {
    System.out.println(item);
}

http://www.playframework.com/documentation/1.2.7/guide2

http://www.playframework.com/documentation/2.1.0/JavaGuide2




http://www.playframework.com/documentation/1.2.7/tags




fancy window modal
http://www.script-tutorials.com/css3-modal-popups/



play framework 1.2.5 session object fuctions
http://www.playframework.com/documentation/1.2/api/play/mvc/Scope.Session.html


http://www.playframework.com/documentation/1.2.7/guide10