View 0_reuse_code.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
View gist:6273c9ed8fc4b7c8bf22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; CouchDB Configuration Settings | |
; Custom settings should be made in this file. They will override settings | |
; in default.ini, but unlike changes made to default.ini, this file won't be | |
; overwritten on server upgrade. | |
[couchdb] | |
;max_document_size = 4294967296 ; bytes | |
uuid = af38fcb0343b2d99833462542e2f2e3e |
View gist:2706edc52da6e14f9bd727ac1c526e16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
////Angular 1.x using Controller and $scope......... | |
var myApp = angular | |
.module("myModule", []) | |
.controller("productController", function($scope) { | |
var prods = { name: "Prod1", quantity: 1 }; | |
$scope.products = prods; | |
}); |
View gist:16067e5b94f1aa629f2e356b6432fcd9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Security; | |
using System.Web.SessionState; | |
namespace eSuperVisionService | |
{ | |
public class Global : System.Web.HttpApplication |
View userDetailsService.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getUserDetails: function (event, context, commonService, dbService, userModel, callback) { | |
let idRetrieved = event.queryStringParameters.id ? event.queryStringParameters.id : ''; | |
dbService.connectDb(commonService.DB_CONFIG.CONNECTIONSTRING, {}).then(() => { | |
dbService.query(userModel, { | |
'userId': idRetrieved | |
}, {}).then(userDataArray => { | |
let userData = userDataArray[0]; | |
return new Promise((resolve, reject) => { | |
if (!userData) { | |
reject('User data is missing'); |
View handler.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case commonServices.API_PATHS.BUY_GETUSERDETAILS: | |
buymangementUserDetailsServivce.getUserDetails(event,context,commonServices,dbService,userModel(dbService),handlerCallback); | |
break; |
View gist:af45e339de06653b2ad6058fb244a2b9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (dbService) { | |
var model = null; | |
var modelName = '_listing_seller'; | |
try { | |
model = dbService.getModel(modelName); | |
} catch (error) { | |
var attachmentSchema = dbService.createEntityDef({ | |
enabled: { | |
type: Boolean | |
}, |
View gist:185cc0d6839eee3479a9505ea3c0167e
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, ViewChild, AfterViewInit } from '@angular/core'; | |
import { ListingContainerComponent } from './listing-container/listing-container.component'; | |
@Component({ | |
moduleId: module.id, | |
templateUrl: 'user-listings.component.html' | |
}) | |
export class UserListingsComponent implements AfterViewInit { | |
@ViewChild(ListingContainerComponent) listingContainerComponent: ListingContainerComponent; |
View gist:11671d24b3634606a56231bd390bdb2a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, SimpleChanges } from '@angular/core'; | |
import { ListingService } from '../../../services/listing.service'; | |
import { ListingDAO } from '../../../../seller/domain/listingDao'; | |
@Component({ | |
moduleId: module.id, | |
selector: 'listing-container', | |
templateUrl: 'listing-container.component.html' | |
}) |
View gist:d69ad52d31e655c33a9c07865648b984
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
angular.module('myapp', ['ngRoute']) | |
.config(["$httpProvider", function ($httpProvider) { | |
$httpProvider.defaults.useXDomain = true; | |
delete $httpProvider.defaults.headers.common['X-Requested-With']; | |
}]) | |
//define controller and inject $http service as dependency. | |
.controller('axajCtrl', ['$http', '$scope', function ($http, $scope) { | |
var url = "http://deals.ownaroof.com/api/webservices/locations_list.json?callback=JSON_CALLBACK"; |
OlderNewer