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 () { | |
var successHandler = function (data) { | |
console.info('Twitter\'s data: %j', data) | |
}; | |
var ErrorHandler = function (error) { | |
console.info('Twitter\'s error:', error) | |
}; | |
$.ajax({ | |
url: 'https://api.twitter.com/1.1/search/tweets.json?q=%23freebandnames&since_id=24012619984051000&max_id=250126199840518145&result_type=mixed&count=4', | |
data: { |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title>Basic Vanilla JavaScript Youtube Player- With playlist</title> | |
</head> | |
<body> | |
<div class="player" style="width: 480px;height:360px;max-width: 50%;margin: 0 auto;"> | |
<div id="youtube" style="width: 100%;height: 100%"></div> | |
<div class="controls" style="text-align: center;margin: 0 auto;"> |
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
/** | |
* @author: Deepak Vishwakarma | |
* @version: 0.0.1 | |
* @copyright: [email protected] | |
*/ | |
(function (window, document, angular, undefined) { | |
'use strict'; | |
angular | |
.module('ngNetworkConnection', []) |
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 alert = console.info; | |
console.time('APP_CALL'); | |
function firstAPI() { | |
alert('first api call'); | |
var i =0; | |
var looptillIndex_sm =1000000; | |
var looptillIndex_lg =1000000000; | |
console.time('API_CALL') | |
//SyncIo | |
while(i < looptillIndex_lg-1){ |
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 strict'; | |
var winstonConf = {}; | |
function _define(config, name, value) { | |
Object.defineProperty(config, name, { | |
value: value, | |
enumerable: true, | |
writable: false, | |
configurable: false | |
}); |
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 strict'; | |
var winston = require('winston'); | |
var config = require('./winston.config'); | |
winston.emitErrs = true; | |
var logger = new winston.Logger({ | |
level: 'debug', | |
levels: config.defaults.levels, | |
handleExceptions: true, | |
transports: [ | |
new winston.transports.Console(config.env[process.env.NODE_ENV] || config.env.development) |
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
Show hidden characters
{ | |
"env": { | |
"node": true | |
}, | |
"globals":{ | |
"anyglobal":true | |
}, | |
"extends": "eslint:recommended", | |
"rules": { | |
"accessor-pairs": "error", |
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
/* | |
* | |
The MIT License (MIT) | |
Copyright (c) 2014 deepakshrma | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
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
//Problem to sort and get port with minimum bandwith, based on switch priority(Select same switch first) | |
var ports = [{ | |
id: 1, | |
switch: 'a', | |
availableBandWidth: 500 | |
},{ | |
id: 2, | |
switch: 'b', | |
availableBandWidth: 10 | |
},{ |
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
/** | |
* Created by intelligrape on 17/7/14. | |
*/ | |
Function.prototype.inherits = function (parent) { | |
"use strict"; | |
this.prototype = new parent(); | |
this.constructor = this; | |
this.prototype.parent = parent.prototype | |
} | |
function User(name) { |
OlderNewer