Skip to content

Instantly share code, notes, and snippets.

View DevankAgarwal's full-sized avatar

Devank Agarwal DevankAgarwal

  • HiRePro Technologies Pvt. Ltd.
  • Bangalore
View GitHub Profile
@DevankAgarwal
DevankAgarwal / amz.less
Created June 16, 2020 10:00
Amazon Registration link
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap');
@font-face {
font-family: AmazonEmber_Bd;
src: url(fonts/AmazonEmber_Bd.ttf);
}
@font-face {
font-family: AmazonEmber_Lt;
src: url(fonts/AmazonEmber_Lt.ttf);
}
@DevankAgarwal
DevankAgarwal / assessmentTemplate.json
Last active May 9, 2019 06:44
AssessmentTemplate JSON
{
"Groups": {
"1": {
"Name": "##Default##Group",
"ScoringRule": {},
"Questions": [
"2",
"1"
]
}
@DevankAgarwal
DevankAgarwal / Generic modal service in angular
Last active October 9, 2015 10:39
Modal window in angular
(function () {
'use strict';
angular
.module(<moduleName>)
.factory('modalService', modalService);
/* @ngInject */
function modalService($q, $modal) {
var service = {
@DevankAgarwal
DevankAgarwal / convertCsharpDate
Last active October 9, 2015 09:58
convert dot net date to java script data
function convertCsharpDate(cSharDate) {
var jsonDate = cSharDate,
re = /-?\d+/,
m = re.exec(jsonDate);
return new Date(parseInt(m[0]));
}
@DevankAgarwal
DevankAgarwal / Processing synchronously in angular
Last active October 9, 2015 09:59
Promise sync in angular.
$http.post(<serviceUrl>, json).then(function (res) {
return $q.when(res);
}).then(function (res) {
console.log(res);
return $q.when(res);
}).then(function (res) {
return res
}).then(function (res) {
defer.resolve(events);
});
@DevankAgarwal
DevankAgarwal / promiseChainingForCatalog.svc.js
Last active October 5, 2015 15:43
promise chaining with $q
(function() {
'use strict';
angular
.module('alienadv.core')
.factory('catalogService', catalogService);
/* @ngInject */
function catalogService($q) {
var service = {