Author Archives: soum

Developer finder

The idea behind this project is to collaborate with fellow developers on an idea of an APP thorough the developer portal. developer finder - New Page

API management layer- API usage stats

UI diagram for API usage. The idea is to give an overview of the usage data to control the API quota for each project. Each project using a API has an allocated quota. This enables the developer to scale the project My stats - New Page

Parsing data from an array

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var arrayforPrinting = [{
    "firstName": "Soumya",
        "lastName": "Ghosh",
        "profession": "Developer",
        "type": "red"
}, {
    "firstName": "Sherry",
        "lastName": "Krieg",
        "profession": "Therapist",
        "type": "white"
}, {
    "firstName": "Snoop",
        "lastName": "Krieg",
        "profession": "Dog",
        "type": "blue"
}
 
];
 
var html = "";
 
$.each(arrayforPrinting, function () {
    html += '<tr><td>' + this.firstName + '</td>';
    html += '<td>' + this.lastName + '</td>';
    html += '<td>' + this.profession + '</td>';
    html += '<td style="background:' + this.type + '"></td><tr>';
});
 
$('.dataTable').append(html);
I am grabbing the data feed at a client side variable and then iterating through the object to print the data as a list

Blocking Redirect based on excluded IP

1
2
3
4
5
6
7
8
9
10
11
12
13
var redirectIPExcludeList = ["213.235.0.105","213.235.0.106",
"86.12.149.50","79.173.148.50","207.164.206.66","1.0.0.255"]
var returnedIp = "213.235.0.106"
 
for(var i =0; i< redirectIPExcludeList.length; i++){
    if(returnedIp != redirectIPExcludeList[i]){
        alert('failed : '+ redirectIPExcludeList[i] + ' != ' +returnedIp );
    }else{
        alert('Perfect Match : '+ redirectIPExcludeList[i] + ' = ' +returnedIp);
        break;
    }
 
}
This was built in demandware. I developed a framework where the business managers from our global offices entered their IP addresses to prevent the default redirect. The redirect project works on an idea to check the clients IP address and then redirect the user to the respective country website. If the IP is coming from the US and the excluded list no redirect happens.