Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*jslint node: true*/
/*global describe: true, before:true, it: true*/
"use strict";
var Promise = require('bluebird');
var chai = require("chai"),
expect = require("chai").expect;
var randomWords = require('random-words');
var argv = require('optimist').demand('config').argv;
var environment = argv.config;
var nconf = require('nconf');
nconf.argv().env().file({ file: 'config.json' });
var cf_api_url = nconf.get(environment + "_" + 'CF_API_URL'),
username = nconf.get(environment + "_" + 'username'),
password = nconf.get(environment + "_" + 'password');
var CloudController = require("../../../../lib/model/cloudcontroller/CloudController");
var CloudFoundryUsersUAA = require("../../../../lib/model/uaa/UsersUAA");
var CloudFoundryApps = require("../../../../lib/model/cloudcontroller/Apps");
var CloudFoundrySpaces = require("../../../../lib/model/cloudcontroller/Spaces");
var CloudFoundryUserProvidedServices = require("../../../../lib/model/cloudcontroller/UserProvidedServices");
var CloudFoundryServiceBindings = require("../../../../lib/model/cloudcontroller/ServiceBindings");
var BuildPacks = require("../../../../lib/model/cloudcontroller/BuildPacks");
CloudController = new CloudController();
/*jslint node: true*/
/*global describe: true, before: true, it: true*/
"use strict";
var Promise = require('bluebird');
var chai = require("chai"),
chaiAsPromised = require("chai-as-promised"),
expect = require("chai").expect;
chai.use(chaiAsPromised);
var argv = require('optimist').demand('config').argv;
var environment = argv.config;
var nconf = require('nconf');
nconf.argv().env().file({ file: 'config.json' });
var cf_api_url = nconf.get(environment + "_" + 'CF_API_URL'),
username = nconf.get(environment + "_" + 'username'),
password = nconf.get(environment + "_" + 'password');
var CloudController = require("../../../../lib/model/cloudcontroller/CloudController");
var CloudFoundryUsersUAA = require("../../../../lib/model/uaa/UsersUAA");
var CloudFoundryApps = require("../../../../lib/model/cloudcontroller/Apps");
CloudController = new CloudController();
CloudFoundryUsersUAA = new CloudFoundryUsersUAA();
CloudFoundryApps = new CloudFoundryApps();
describe("Cloud Foundry Authentication", function () {
/*jslint node: true*/
/*global describe: true, before: true, it: true*/
"use strict";
var Promise = require('bluebird');
var chai = require("chai"),
expect = require("chai").expect;
var argv = require('optimist').demand('config').argv;
var environment = argv.config;
var nconf = require('nconf');
nconf.argv().env().file({ file: 'config.json' });
var cf_api_url = nconf.get(environment + "_" + 'CF_API_URL'),
username = nconf.get(environment + "_" + 'username'),
password = nconf.get(environment + "_" + 'password');
var CloudController = require("../../../../lib/model/cloudcontroller/CloudController");
var CloudFoundryUsersUAA = require("../../../../lib/model/uaa/UsersUAA");
var CloudFoundryOrg = require("../../../../lib/model/cloudcontroller/Organizations");
var CloudFoundryOrgQuota = require("../../../../lib/model/cloudcontroller/OrganizationsQuota");
var CloudFoundrySpaces = require("../../../../lib/model/cloudcontroller/Spaces");
var CloudFoundryUsers = require("../../../../lib/model/cloudcontroller/Users");
CloudController = new CloudController();
CloudFoundryUsersUAA = new CloudFoundryUsersUAA();
/*jslint node: true*/
/*global describe: true, before: true, it: true */
"use strict";
var Promise = require('bluebird');
var chai = require("chai"),
expect = require("chai").expect;
var argv = require('optimist').demand('config').argv;
var environment = argv.config;
var nconf = require('nconf');
nconf.argv().env().file({ file: 'config.json' });
var cf_api_url = nconf.get(environment + "_" + 'CF_API_URL'),
username = nconf.get(environment + "_" + 'username'),
password = nconf.get(environment + "_" + 'password');
var CloudController = require("../../../../lib/model/cloudcontroller/CloudController");
var CloudFoundryUsersUAA = require("../../../../lib/model/uaa/UsersUAA");
var CloudFoundryApps = require("../../../../lib/model/cloudcontroller/Apps");
var CloudFoundryLogs = require("../../../../lib/model/metrics/Logs");
CloudController = new CloudController();
CloudFoundryUsersUAA = new CloudFoundryUsersUAA();
CloudFoundryApps = new CloudFoundryApps();
CloudFoundryLogs = new CloudFoundryLogs();
#!/usr/bin/env node
var argv = require('optimist')
.demand(2)
.argv;
console.dir(argv)
var express = require('express'),
gzippo = require('gzippo'),
consolidate = require('consolidate'),
readContent = require('./read-content.js'),
readPagesList = require('./read-pages-list.js'),
barrier = require('./barrier.js'),
environment = require('optimist')
.demand(['env'])
.argv.env,
PORT = '8888',
isProd = (environment == 'prod'),
SCRIPTS = isProd? ['/js-concat/all.js'] : require('./sourceList.js'),
CSS_STYLESHEETS = isProd? ["all-min.css"] : ["all.css"],
LATEST_TAG = 'v2.0.0',
ANALYTICS_ID = 'UA-47871814-1',
RAW_REPO_LOCATION = 'https://raw.github.com/jimhigson/oboe.js',
REPO_LOCATION = 'https://github.com/jimhigson/oboe.js',
app = express();
var fs = require('fs')
var mega = require('../lib/mega')
var argv = require('optimist')
.demand(2)
.usage('USAGE: node example/list \n' +
' node example/list --download pattern\n' +
' node example/list --monitor')
.argv
var storage = mega({email: argv._[0], password:argv._[1], keepalive: !!argv.monitor})
storage.on('ready', function() {
storage.mounts.forEach(function(f) {print(f)})
for (var id in storage.files) {
var f = storage.files[id]
if (!f.directory) {
if (f.name.indexOf(argv.download) != -1) {
(function(f) {
#!/usr/bin/env node
var search = require('../lib/index.js');
var argv = require('optimist')
.demand(1)
.describe('exact', "use exact keywords only (bool)")
.describe('relevance', "relevance factor for sorting `number > 0` `default 0.25`")
.describe('downloads', "downloads factor for sorting `number > 0` `default 1.5`")
.describe('freshness', "freshness factor for sorting `number > 0` `default 0.5`")
.describe('halflife', "halflife of download count value in days")
.describe('aging', "halflife of package freshness in days")
.describe('dataAge', "maximum data age in (days) or update data from server")
.describe('refresh', "force data update (bool)")
.argv
search(argv._, argv, function(err, results) {
var limit = argv.limit || 7;
for (var k = 0; k < Math.min(results.length, limit); ++k) {
var details = results[k];
var space = " ";
var main = function() {
var argv = require('optimist')
.demand('t')
.alias('t', 'type')
.describe('t', 'type of harvest: flickr, foursquare_venues, foursquare_update, foursquare_nextvenues, twitter, instagram')
.argv;
if (argv.t == 'flickr') {
flickr();
} else if (argv.t == 'foursquare_venues') {
foursquare();
} else if (argv.t == 'foursquare_update') {
getFullVenuesForAllVenues(process.exit);
#!/usr/bin/env node
var eol = require('os').EOL;
var sql = require('mssql');
var async = require('async');
var _ = require('underscore');
var argv = require('optimist')
.demand(['s', 'u', 'p'])
.alias('s', 'server')
.alias('o', 'port')
.alias('u', 'user')
.alias('p', 'password')
.alias('d', 'database')
.alias('t', 'timeout')
.alias('m', 'param')
.describe('s', '')
.describe('u', '')
.describe('p', '')
.describe('o', 'Default: 1433')
.describe('d', 'Default: master')
.describe('t', 'Default: 60 seconds')
.describe('m', 'Format: param1=foo')
.describe('no-quoted-identifier', 'Disable quoted identifiers.')