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 () { | |
if ( typeof window.CustomEvent === "function" ) return false; | |
function CustomEvent ( event, params ) { | |
params = params || { bubbles: false, cancelable: false, detail: undefined }; | |
var evt = document.createEvent( 'CustomEvent' ); | |
evt.initCustomEvent( event, params.bubbles, params.cancelable, params.detail ); | |
return evt; | |
} | |
CustomEvent.prototype = window.Event.prototype; | |
window.CustomEvent = CustomEvent; |
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
{ | |
"url": "http://localhost/v1/api-docs", | |
"apisSorter": "alpha", | |
"displayOperationId": true | |
} |
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
/* | |
AWS SDK for Node.js provides the s3.listObjects API which | |
lists the objects from a bucket. However, if you have a lot | |
of objects in your bucket then the response of this API is | |
truncated. So, the entire contents of a bucket cannot be | |
fetched in a single API call and you need to call the API | |
multiple times, each time passing a `marker` parameter which | |
is the `Key` of the last element of the previous response. | |
This gist is demonstrating the same. This script uses async/await | |
feature of the Node.js so make sure you have the appropirate |
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
// run the server using `node server.js` command | |
// connect to the server using `nc <IP address> 8080` | |
const server = require('net').createServer(); | |
let sockets = {}; | |
let counter = 1; | |
function timestamp () { | |
const now = new Date(); |
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
var app = angular.module("modalFormApp", ['ui.bootstrap']); | |
app.controller("modalAccountFormController", ['$scope', '$modal', '$log', | |
function ($scope, $modal, $log) { | |
$scope.showForm = function () { | |
$scope.message = "Show Form Button Clicked"; | |
console.log($scope.message); | |
var modalInstance = $modal.open({ |