Monday, June 23, 2014

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

Thursday, May 29, 2014

IP V6 addressing

http://ipv6.com/articles/general/IPv6-Addressing.htm

Why we need IPv6 Addressing

An escalating demand for IP addresses acted as the driving force behind the development of the large address space offered by the IPv6. According to industry estimates, in the wireless domain, more than a billion mobile phones, Personal Digital Assistants (PDA), and other wireless devices will require Internet access, and each will need its own unique IP address.

The extended address length offered by IPv6 eliminates the need to use techniques such as network address translation to avoid running out of the available address space. IPv6 contains addressing and control information to route packets for the next generation Internet.

Types of IPv6 Addresses

IPv6 addresses are broadly classified into three categories:

1) Unicast addresses A Unicast address acts as an identifier for a single interface. An IPv6 packet sent to a Unicast address is delivered to the interface identified by that address.

2) Multicast addresses A Multicast address acts as an identifier for a group/set of interfaces that may belong to the different nodes. An IPv6 packet delivered to a Multicast address is delivered to the multiple interfaces.

3) Anycast addresses Anycast addresses act as identifiers for a set of interfaces that may belong to the different nodes. An IPv6 packet destined for an Anycast address is delivered to one of the interfaces identified by the address.

IPv6 Address Notation

IPv6 addresses are denoted by eight groups of hexadecimal quartets separated by colons in between them.

Following is an example of a valid IPv6 address: 2001:cdba:0000:0000:0000:0000:3257:9652

Any four-digit group of zeroes within an IPv6 address may be reduced to a single zero or altogether omitted. Therefore, the following IPv6 addresses are similar and equally valid:

2001:cdba:0000:0000:0000:0000:3257:9652
2001:cdba:0:0:0:0:3257:9652
2001:cdba::3257:9652

The URL for the above address will be of the form:

http://[2001:cdba:0000:0000:0000:0000:3257:9652]/

Network Notation in IPv6

The IPv6 networks are denoted by Classless Inter Domain Routing (CIDR) notation. A network or subnet using the IPv6 protocol is denoted as a contiguous group of IPv6 addresses whose size must be a power of two. The initial bits of an IPv6 address (these are identical for all hosts in a network) form the network s prefix. The size of bits in a network prefix are separated with a / . For example, 2001:cdba:9abc:5678::/64 denotes the network address 2001:cdba:9abc:5678. This network comprises of addresses rearranging from 2001:cdba:9abc:5678:: up to 2001:cdba:9abc:5678:ffff:ffff:ffff:ffff. In a similar fashion, a single host may be denoted as a network with a 128-bit prefix. In this way, IPv6 allows a network to comprise of a single host and above.

Special Addresses in IPv6

 ::/96 The zero prefix denotes addresses that are compatible with the previously used IPv4 protocol.
 ::/128 An IPv6 address with all zeroes in it is referred to as an unspecified address and is used for addressing purposes within a software.
 ::1/128 This is called the loop back address and is used to refer to the local host. An application sending a packet to this address will get the packet back after it is looped back by the IPv6 stack. The local host address in the IPv4 was 127.0.0.1 .
 2001:db8::/32 This is a documentation prefix allowed in the IPv6. All the examples of IPv6 addresses should ideally use this prefix to indicate that it is an example.
 fec0::/10 This is a site-local prefix offered by IPv6. This address prefix signifies that the address is valid only within the local organization. Subsequently, the usage of this prefix has been discouraged by the RFC.
 fc00::/7 This is called the Unique Local Address (ULA). These addresses are routed only within a set of cooperating sites. These were introduced in the IPv6 to replace the site-local addresses. These addresses also provide a 40-bit pseudorandom number that reduces the risk of address conflicts.
 ff00::/8 This prefix is offered by IPv6 to denote the multicast addresses. Any address carrying this prefix is automatically understood to be a multicast address.
 fe80::/10 This is a link-local prefix offered by IPv6. This address prefix signifies that the address is valid only in the local physical link.

Reference: Please see RFC 1884 - IP Version 6 Addressing Architecture for more information.