code stringlengths 2 1.05M | repo_name stringlengths 5 114 | path stringlengths 4 991 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
var util = require("util"),
Super = require("./super");
function GitArchive() {
};
module.exports = GitArchive;
util.inherits(GitArchive, Super);
GitArchive.prototype.format = "zip";
GitArchive.prototype.tree = "master";
GitArchive.prototype.fileCreated = false;
GitArchive.prototype.exec = function()
... | g4code/gdeployer | lib/exec/git-archive.js | JavaScript | mit | 853 |
export const MRoot = {
name: 'm-root',
nodeName: 'm-node',
data() {
return {
nodeVMs: [],
};
},
methods: {
walk(func) {
let queue = [];
queue = queue.concat(this.nodeVMs);
let nodeVM;
while ((nodeVM = queue.shift()))... | vusion/proto-ui | src/components/m-root.vue/index.js | JavaScript | mit | 756 |
(window.webpackJsonp=window.webpackJsonp||[]).push([[98],{465:function(t,e,n){"use strict";n.r(e);var s=n(1),l=Object(s.a)({},(function(){var t=this.$createElement;return(this._self._c||t)("ContentSlotsDistributor",{attrs:{"slot-key":this.$parent.slotKey}})}),[],!1,null,null,null);e.default=l.exports}}]); | anelda/website | assets/js/98.74042299.js | JavaScript | mit | 306 |
(function (factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
}
})(function (exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
"use strict";
var ATTR... | parambirs/aui-demos | node_modules/@atlassian/aui/node_modules/skatejs/lib/constants.js | JavaScript | mit | 598 |
/**
* Created by jiamiu on 14-4-10.
*/
var _=require('lodash')
function A(){}
A.prototype.fn = function(){
}
var a = new A
a.pro = {}
var b = _.cloneDeep(a)
//console.log(b.fn,a.fn)
var c = {}
c.__proto__ = A.prototype
_.assign( c, a )
c.own = {}
console.log( c.fn === a.fn,a.pro === c.pro, c.own ===a.own)
... | sskyy/icejs | test/lodash.js | JavaScript | mit | 322 |
/*!
* Copyright(c) 2014 Jan Blaha
*/
define(["async", "underscore"], function(async, _) {
var ListenerCollection = function () {
this._listeners = [];
};
ListenerCollection.prototype.add = function (context, listener) {
this._listeners.push({
fn: listener || context,
... | uttapong/thalinterpreter | node_modules/jsreport/extension/express/public/js/core/listenerCollection.js | JavaScript | mit | 817 |
const userService = require('../../../services/user.service');
module.exports = (_, args, ctx) => userService.getById(ctx.user.id);
| alexandarnikita/wen | server/graphql/resolvers/me/me.process.resolver.js | JavaScript | mit | 134 |
import Component from './ImageSlider';
import StyledComponent from './styles';
export default StyledComponent(Component);
| stephencorwin/stephencorwin.me | app/components/ImageSlider/index.js | JavaScript | mit | 123 |
'use strict';
const assert = require('assert');
const should = require('should');
const uuid = require('uuid/v1');
const _ = require('lodash');
const GeoPoint = require('loopback-datasource-juggler').GeoPoint;
const initialization = require("./init.js");
const exampleData = require("./exampleData.js");
describe('co... | juanelojga/loopback3-connector-couchbase | test/couchbase.test.js | JavaScript | mit | 41,738 |
'use strict';
/**
* Module dependencies.
*/
var passport = require('passport'),
url = require('url'),
GoogleStrategy = require('passport-google-oauth').OAuth2Strategy,
config = require('../config'),
users = require('../../app/controllers/users.server.controller');
module.exports = function () {
// Use goo... | adipuscasu/angt1 | config/strategies/google.js | JavaScript | mit | 1,285 |
"use strict";
describe('The two basic principles of LINQ', function () {
it('uses lazy evaluation', function () {
// Arrange
var enumerable = Enumerable.range(0, 10);
// Act
enumerable
.filter(function () {
fail('This function should not be called');
... | schmuli/linq.es6 | tests/linq_principles.js | JavaScript | mit | 718 |
define([
'gmaps',
'config',
'leaflet',
'leaflet-pip',
'app-state'
], function (gmaps, config, L, leafletPip, appState) {
"use strict";
var
geocoder = new gmaps.Geocoder(),
// simplifies place name for geocoder to get better results
locationAddress = function(place_name, district_name) {
... | saxicek/odpad-praha8.cz | client/src/js/containers/geo-util.js | JavaScript | mit | 2,887 |
movieApp.
controller('MovieController', function($scope, MovieService) {
$scope.listMovies = function () {
MovieService.listMovies()
.success(function (result) {
$scope.movies = result;
})
.error(function (error) {
$scope.status = 'Backend error: ' + error.message;
... | mi-we/jso-camp-2017 | akka-rest/src/main/resources/web/js/controllers.js | JavaScript | mit | 608 |
UPTODATE('1 day');
var common = {};
// Online statistics for visitors
(function() {
if (navigator.onLine != null && !navigator.onLine)
return;
var options = {};
options.type = 'GET';
options.headers = { 'x-ping': location.pathname, 'x-cookies': navigator.cookieEnabled ? '1' : '0', 'x-referrer': document.refer... | totaljs/eshop | themes/default/public/js/default.js | JavaScript | mit | 3,915 |
/**
* The Logging layer module.
*
* @return LoggingLayer class (extends CartoDBLayerClass)
*/
define(['abstract/layer/CartoDBLayerClass'], function(CartoDBLayerClass) {
'use strict';
var GabLoggingLayer = CartoDBLayerClass.extend({
options: {
sql:
"SELECT 'gab_logging' as tablename, cartodb_i... | Vizzuality/gfw-climate | app/assets/javascripts/map/views/layers/GabLoggingLayer.js | JavaScript | mit | 651 |
import { booleanAttributeValue, standardBooleanAttributes } from "./dom.js";
import { rendering } from "./internal.js";
// Memoized maps of attribute to property names and vice versa.
// We initialize this with the special case of the tabindex (lowercase "i")
// attribute, which is mapped to the tabIndex (capital "I")... | elix/elix | src/core/AttributeMarshallingMixin.js | JavaScript | mit | 7,052 |
/*
module ในการเก็บ route ใน เมธอด GET
*/
var fs = require('fs');
var path = require('path');
var getRoutes = {};
getRoutes['/'] = require('./get/index.js').getPage;
getRoutes['/level'] = require('./get/level.js').getPage;
getRoutes['/play'] = require('./get/play.js').getPage;
getRoutes['Error 404'] = (req, res) ... | Painti/cs485 | routes/getMethod.js | JavaScript | mit | 2,982 |
import EzTabPanelList from 'ember-ez-tabs/ez-tab-panel-list';
export default EzTabPanelList;
| forticulous/ember-ez-tabs | app/components/ez-tab-panel-list.js | JavaScript | mit | 94 |
import test from 'ava';
import mdIt from './utils/md-it';
test('quotes should work with basic text', t => {
t.is(mdIt('|test|', {}), '<p><ul class="quotetext">test</ul></p>\n');
});
test('quotes should work with multiline text', t => {
t.is(mdIt('|test\ntesting as well|', {}),
'<p><ul class="quotetext">tes... | markbahnman/hubski-markdown | tests/quote.js | JavaScript | mit | 357 |
var sound = require("models/sound.js");
var command = require("models/command.js");
var testcase = require("models/testcase.js");
var soundScript = require("models/soundScript.js");
var config = require("config.js");
var Log = require("logger.js");
var scriptInterpreter = require("scriptInterpreter.js");
var path = req... | KorlaMarch/sound-identification | nodejs/app/testcaseGenerator.js | JavaScript | mit | 6,481 |
/*
* The MIT License (MIT)
*
* Copyright (c) 2015 - Gabriel Reiser, greiser
*
* 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 righ... | janusnic/axt | spec/axt.Ajax.spec.js | JavaScript | mit | 1,737 |
// code sent to client and server
// which gets loaded before anything else (since it is in the lib folder)
// define schemas and collections
// those will be given to all templates
Schemas = {};
// Collections = {};
Items = new Mongo.Collection('items');
Times = new Mongo.Collection('times');
Attributes = new Mongo.... | qnipp/timeapp | lib/collections.js | JavaScript | mit | 28,708 |
// Copyright Joyent, Inc. and other Node contributors.
//
// 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, modi... | MTASZTAKI/ApertusVR | plugins/languageAPI/jsAPI/3rdParty/nodejs/10.1.0/source/test/parallel/test-string-decoder.js | JavaScript | mit | 8,253 |
var expect = require('expect.js'),
parse = require('../lib/parser.js');
describe('parser:', function() {
it('should parse function with no arguments.', function() {
expect(parse('(someFunc)')).to.eql([{
type: 'function',
name: 'someFunc',
args: []
}]);
})... | vicjohnson1213/Kelp | test/parser.js | JavaScript | mit | 6,104 |
// Copyright (c) 2012 Ecma International. All rights reserved.
// Ecma International makes this code available under the terms and conditions set
// forth on http://hg.ecmascript.org/tests/test262/raw-file/tip/LICENSE (the
// "Use Terms"). Any redistribution of this code must retain the above
// copyright and this n... | PiotrDabkowski/Js2Py | tests/test_cases/built-ins/Array/prototype/some/15.4.4.17-7-c-iii-4.js | JavaScript | mit | 770 |
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['jasmine'],
files: [
'src/bobril.js',
... | trueadm/todomvc-perf-comparison | todomvc-benchmark/todomvc/bobril/debugkarma.conf.js | JavaScript | mit | 1,495 |
'use strict';
/**
* This controller handles trigger requests from the Cumulus system that fires
* when assets are updated, inserted or deleted.
*
* An example request is:
*
* req.body = {
* id: 'FHM-25757',
* action: 'asset-update',
* collection: 'Frihedsmuseet',
* apiKey: ''
* }
*/
const ds = req... | CopenhagenCityArchives/kbh-billeder | webapplication/controllers/indexing.js | JavaScript | mit | 5,865 |
/**
* Copyright (C) 2014-2016 Triumph LLC
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program i... | vingkan/spacehacks | src/ext/lights.js | JavaScript | mit | 15,439 |
// load all the things we need
var LocalStrategy = require('passport-local').Strategy;
var FacebookStrategy = require('passport-facebook').Strategy;
var TwitterStrategy = require('passport-twitter').Strategy;
var GoogleStrategy = require('passport-google-oauth').OAuth2Strategy;
// load up the user model
v... | josephbaena/CS147-Project | config/passport.js | JavaScript | mit | 14,142 |
/**
* Created by Luigi Ilie Aron on 27.01.15.
* email: luigi@kreditech.com
*/
var assert = require('assert'),
_ = require('lodash');
describe('Semantic Interface', function() {
describe('.getRawCollection()', function() {
it('should create a set of 15 users', function(done) {
var usersAr... | aronluigi/sails-cbes | test/interfaces/semantic/getRawCollection.test.js | JavaScript | mit | 2,741 |
// Karma configuration
// Generated on Fri May 27 2016 18:39:38 GMT+0200 (CEST)
const webpackConf = require('./test/unit/webpack.config');
module.exports = function (config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
... | Hypheme/harmonized.js | integration.karma.conf.js | JavaScript | mit | 2,461 |
// Copyright OpenLogic, Inc.
// See LICENSE file for license information.
//
var totalRequests = 0;
// First check the MIME type of the URL. If it is the desired type, then make
// the AJAX request to get the content (DOM) and extract the relevant links
// in the content.
function follow_html_mime_type(url)
{
var ... | openlogic/chrome-link-scraper | send_second_level_links.js | JavaScript | mit | 2,658 |
import { mount } from '@vue/test-utils';
import TocButton from '../src/views/TocButton';
function createWrapper() {
return mount(TocButton);
}
describe('Table of contents button', () => {
it('should mount', () => {
const wrapper = createWrapper();
expect(wrapper.exists()).toBe(true);
});
it('should em... | DXCanas/kolibri | kolibri/plugins/document_epub_render/assets/tests/TocButton.spec.js | JavaScript | mit | 511 |
'use strict';
angular
.module('reflect.calendar')
.factory('calendarHelper', function(moment, calendarConfig) {
function eventIsInPeriod(eventStart, eventEnd, periodStart, periodEnd) {
eventStart = moment(eventStart);
eventEnd = moment(eventEnd);
periodStart = moment(periodStart);
per... | el-besto/ts-angular-bootstrap-calendar | src/services/calendarHelper.js | JavaScript | mit | 7,806 |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
var routes = require('./routes/index');
var users = require('./routes/users');
var orgs = require('... | alexzywiak/sage-es6 | server/server.js | JavaScript | mit | 1,548 |
import React from 'react';
import { assert } from 'chai';
import { createMount, createShallow, getClasses } from '@material-ui/core/test-utils';
import describeConformance from '../test-utils/describeConformance';
import AppBar from './AppBar';
import Paper from '../Paper';
describe('<AppBar />', () => {
let mount;
... | kybarg/material-ui | packages/material-ui/src/AppBar/AppBar.test.js | JavaScript | mit | 1,998 |
var mongoose = require('mongoose'),
_ = require('lodash'),
moment = require('moment');
module.exports = function (req, res) {
var connectionDB = mongoose.connection.db;
var today = moment().startOf('day');
var tomorrow = moment(today).add(1, 'days');
var dayAfterTomorrow = moment(today).add(2, ... | ethannguyen93/POS | app/models/operations/appointment/getNumberOfReminders.js | JavaScript | mit | 1,892 |
(function(root, factory) {
if (typeof exports === "object") {
module.exports = factory();
} else if (typeof define === "function" && define.amd) {
define([], factory);
} else{
factory();
}
}(this, function() {
/**
* AngularJS Google Maps Ver. 1.18.4
*
* The MIT License (MIT)
*
* Copyright (c) 2014, 2015, 1016 All... | Cyb3rN4u7/Open-Weather-Map-Angular-App | app/js/ngmap/ng-map.no-dependency.js | JavaScript | mit | 107,117 |
module.exports = {
site: {
title: 'i18n node example',
description: 'An example for this module on node'
},
bankBalance: 'Hi {1}, your balance is {2}.',
transports: {
yacht: 'Yacht',
bike: 'Bike'
},
modeOfTransport: 'Your preferred mode of transport is by {1}.'
}; | DominicTobias/i18n-simple | examples/nodejs/locale/en-GB.js | JavaScript | mit | 278 |
var fs = require('co-fs')
, test = require('bandage')
, main = require('..')
, parse = main.parse
, write = main.write
, parseFmtpConfig = main.parseFmtpConfig
, parseParams = main.parseParams
, parseImageAttributes = main.parseImageAttributes
, parseSimulcastStreamList = main.parseSimulcastStreamList
... | clux/sdp-transform | test/parse.test.js | JavaScript | mit | 37,501 |
// All material copyright ESRI, All Rights Reserved, unless otherwise specified.
// See https://js.arcgis.com/4.16/esri/copyright.txt for details.
//>>built
define(["require","exports"],function(c,g){Object.defineProperty(g,"__esModule",{value:!0});g.SwapTable=[["(",")"],[")","("],["\x3c","\x3e"],["\x3e","\x3c"],["[","... | ycabon/presentations | 2020-devsummit/arcgis-js-api-road-ahead/js-api/esri/core/bidiEngineTables.js | JavaScript | mit | 9,169 |
var flag = "did_you_use_python's_[::-1]_notation?";
exports.get_data = function(req, callback) {
var result = [];
var s = [
"[Go, droop aloof] sides reversed, is [fool a poor dog]. I did roar again, Niagara! ... or did I?",
"Help Max, Enid -- in example, H. See, slave, I demonstrate yet arts no medieval sees.",
... | CTCTF/Backend | api/ide/palindrama.js | JavaScript | mit | 2,165 |
(function () {
"use strict";
angular
.module('documents')
.component('scientillaDocumentAffiliations', {
templateUrl: 'partials/scientilla-document-affiliations.html',
controller: controller,
controllerAs: 'vm',
bindings: {
docume... | scientilla/scientilla | assets/js/app/documents/scientilla-document-affiliations.component.js | JavaScript | mit | 1,945 |
exports.config = {
allScriptsTimeout: 11000,
specs: [
'*.js'
],
capabilities: {
'browserName': 'chrome'
},
baseUrl: 'http://localhost:8080/mylibrary/',
framework: 'jasmine',
jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}
};
| TAMULib/Weaver-UI-Seed | tests/e2e/protractor.conf.js | JavaScript | mit | 263 |
const { resolve } = require('path')
const express = require('express')
const bodyParser = require('body-parser')
var proxy = require('express-http-proxy')
const app = express()
// parse JSON bodies
app.use(bodyParser.json({ type: 'application/json' }))
// the index file
app.get('/', (req, res) => {
res.sendFile(re... | Scripta-Qumranica-Electronica/Scrollery-website | tools/app.js | JavaScript | mit | 555 |
'use strict';
var AppDispatcher = require('../dispatchers/AppDispatcher');
var AppStore = require('../stores/AppStore');
var AppConstants = require('../constants/AppConstants');
var ServerActions = {
receiveData: function(data) {
AppDispatcher.handleViewAction({
actionType: AppConstants.GET_CATEGORIES,
... | davunderscorei/tab-hq-react | app/js/actions/ServerActions.js | JavaScript | mit | 2,322 |
function Database() {
if(typeof this.mysql == "undefined") {
this.init();
}
}
Database.prototype.init = function() {
var mysql = require('mysql');
this.connection = mysql.createConnection({
host : 'localhost',
user : 'root',
password : 'test1234',
database : 'linkbank'
});
},
... | jvanhalen/linkbank | database/database.js | JavaScript | mit | 2,266 |
module.exports = [
require('./deepSouth'),
require('./fallsRiverMusic')
// require('./gizmoBrewWorks')
];
| mweslander/veery | src/api/lib/siteScraper/sites/northCarolina/raleigh/index.js | JavaScript | mit | 112 |
// app/routes.js
// grab the country model we just created
var Country = require('./models/country');
module.exports = function (app) {
//----------------------------------------------------------------------
// server routes
// handle things like api calls
// authentication routes
// sample api route
a... | ioanungurean/gexp | app/routes.js | JavaScript | mit | 6,198 |
'use strict'
var _ = require('lodash'),
CrudRoutes = require('../lib/crud-routes'),
transactions = require('../services/transactions'),
log = require('../lib/log');
let opts = {
entity: 'transactions',
service: transactions,
user: true,
parent: {
name: 'account'
},
protected... | jcapuano328/scratch-minder-services | src/routes/transactions.js | JavaScript | mit | 2,354 |
/*Write an if statement that takes two double variables a and b and exchanges their values if the first one is greater than the second.
As a result print the values a and b, separated by a space.*/
console.log('-----Problem 1. Exchange if greater-----');
function exchangeIfIsGrater (first, second){
console.log('... | ReniGetskova/JavaScript-Fundamentals | ConditionalStatements/1.ExchangeIfGrater.js | JavaScript | mit | 552 |
'use strict';
module.exports = {
type: 'error',
error: {
line: 1,
column: 3,
message: 'Unexpected character \'💩\'.',
},
};
| fatfisz/binapi | test/fixtures/lexer/identifier error/config.js | JavaScript | mit | 145 |
export { default } from 'ember-radical/components/rad-dropdown/content'
| healthsparq/ember-radical | app/components/rad-dropdown/content.js | JavaScript | mit | 72 |
/* eslint-disable @typescript-eslint/no-var-requires */
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
const webpack = require('webpack');
const { version, author, license } = require('./package.json');
module.exports = {
entry: './src/index.js',
output: {
filename: 'to... | nhnent/tui.editor | apps/vue-editor/webpack.config.js | JavaScript | mit | 1,481 |
var gulp = require('gulp');
var to5 = require('gulp-6to5');
var concat = require('gulp-concat');
var order = require('gulp-order');
var watch = require('gulp-watch');
var connect = require('gulp-connect');
gulp.task('6to5', function () {
return gulp.src('src/js/**/*.js')
.pipe(order([
'core/**/*.js',
... | samuelleeuwenburg/Orbitals | gulpfile.js | JavaScript | mit | 728 |
define([
'lib/validators/moment',
'lib/validators/unequalTo'
], function () {
});
| davidknezic/bitcoin-trade-guard | src/js/lib/validators.js | JavaScript | mit | 92 |
/**
* Created by kobi on 5/15/14.
*/
exports.welcome = function(req,res){
res.json({message:'welcome to Money Map API'});
}
| kobiluria/MoneyMap | routes/basic_response.js | JavaScript | mit | 134 |
'use strict';
const
Board = require('./board'),
config = require('./config'),
Characters = require('./characters'),
LongTasks = require('./long-tasks'),
Pause = require('./pause'),
Scoreboard ... | hiddenwaffle/mazing | src/js/level.js | JavaScript | mit | 5,728 |
/* this file is autogenerated*/
| PillowPillow/grunt-add-comment | test/files/test.js | JavaScript | mit | 33 |
/* globals options */
/* eslint-disable comma-dangle */
var opt = options;
var socket = new WebSocket('ws://localhost:' + opt.port);
socket.addEventListener('message', function(event) {
var ngHotReloadCore = (opt.root || window)[opt.ns].ngHotReloadCore;
var data = event.data ? JSON.parse(event.data) : {};... | noppa/ng-hot-reload | packages/standalone/src/client.tpl.js | JavaScript | mit | 1,049 |
//repl read eval print loop
console.log('start');
| WakeUpPig/node2015 | 1.node/start.js | JavaScript | mit | 58 |
"use strict";
class FeatsPage extends ListPage {
constructor () {
const pageFilter = new PageFilterFeats();
super({
dataSource: "data/feats.json",
pageFilter,
listClass: "feats",
sublistClass: "subfeats",
dataProps: ["feat"],
isPreviewable: true,
});
}
getListItem (feat, ftI, isExclude... | TheGiddyLimit/astranauta.github.io | js/feats.js | JavaScript | mit | 3,311 |
jQuery(document).ready(function($){
var nameDefault = 'Your name...';
var emailDefault = 'Your email...';
var messageDefault = 'Your message...';
// Setting up existing forms
setupforms();
function setupforms() {
// Applying default values
setupDefaultText('#name',nameDefault);
setupDefault... | lightnin/lightnin.github.io | assets/js/jquery.validation.settings.js | JavaScript | mit | 3,099 |
$(document).ready(function() {
/* initialize the external events
-----------------------------------------------------------------*/
$('#external-events div.external-event').each(function() {
// create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/)
// it doesn't need ... | vectortiny/FullCalendar_adapt | demos/js/lsn.js | JavaScript | mit | 5,894 |
#!/usr/bin/env node
var app = require('./app'),
config = require('./config');
app.set('port', process.env.PORT || config.app.port);
var server = app.listen(app.get('port'), function() {
"use strict";
console.log('Express server listening on port ' + server.address().port);
});
| junwang1216/iDawn | web/server.js | JavaScript | mit | 293 |
"use strict";
/**
* Storing multiple constant values inside of an object
* Keep in mind the values in the object mean they can be modified
* Which makes no sense for a constant, use wisely if you do this
*/
app.service('$api', ['$http', '$token', '$rootScope', '$sweetAlert', '$msg', 'SERVER_URL',
function ($ht... | shobhit-github/RetailerStock | ngApp/src/services/httpService.js | JavaScript | mit | 4,478 |
/**
* @file Link files.
* @function filelink
* @param {string} src - Source file (actual file) path.
* @param {string} dest - Destination file (link) path.
* @param {object} [options] - Optional settings.
* @param {string} [options.type='symlink'] - Link type
* @param {boolean} [options.mkdirp] - Make parent dir... | okunishinishi/node-filelink | lib/filelink.js | JavaScript | mit | 2,238 |
// EXPRESS SERVER HERE //
// BASE SETUP
var express = require('express'),
app = express(),
bodyParser = require('body-parser'),
cookieParser = require('cookie-parser'),
session = require('express-session'),
methodOverride = require('method-override'),
// routes = require('./routes/routes'),
... | Kinddle/soxy | server/server.js | JavaScript | mit | 2,047 |
//Capturar possibles errors
process.on('uncaughtException', function(err) {
console.log(err);
});
//Importar mòdul net
var net = require('net')
//Port d'escolta del servidor
var port = 8002;
//Crear servidor TCP
net.createServer(function(socket){
socket.on('data', function(data){
//Parse dades JSON
var jso... | rromero83/thethingsio-coap-openDemo | openDemo/read/Read.js | JavaScript | mit | 1,304 |
import { GET_WAREHOUSES_FULL_LIST, GET_WAREHOUSE, GET_COMPANIES, GET_SUPERVISORS } from '../actions/warehouses';
import humanize from 'humanize';
import Moment from 'moment';
const INITIAL_STATE = {
warehousesList: [],
warehouseDetail: {},
warehouseId: 0,
companiesList: [],
supervisorsList: []
};
export def... | Xabadu/VendOS | src/reducers/reducer_warehouses.js | JavaScript | mit | 2,069 |
dhtmlXForm.prototype.items.calendar = {
render: function(item, data) {
var t = this;
item._type = "calendar";
item._enabled = true;
this.doAddLabel(item, data);
this.doAddInput(item, data, "INPUT", "TEXT", true, true, "dhxform_textarea");
item.childNodes[item._ll?1:0].childNodes[0... | lincong1987/foxhis-website | js/dhtmlx/form/ext/calendar.js | JavaScript | mit | 3,369 |
let charLS;
function jpegLSDecode (data, isSigned) {
// prepare input parameters
const dataPtr = charLS._malloc(data.length);
charLS.writeArrayToMemory(data, dataPtr);
// prepare output parameters
const imagePtrPtr = charLS._malloc(4);
const imageSizePtr = charLS._malloc(4);
const widthPtr = charLS._ma... | google/cornerstoneWADOImageLoader | src/webWorker/decodeTask/decoders/decodeJPEGLS.js | JavaScript | mit | 3,494 |
//= require ./ace/ace
//= require ./ace/mode-ruby
//= require ./ace/theme-tomorrow
//= require ./ace/ext-whitespace
$(function() {
var editor = ace.edit("editor");
editor.setTheme("ace/theme/tomorrow");
editor.getSession().setMode("ace/mode/ruby");
editor.getSession().setTabSize(2);
editor.getSession().setUs... | cctiger36/batch_manager | app/assets/javascripts/batch_manager/editor.js | JavaScript | mit | 422 |
// ===================================================================
//
// Mixology example: SENDER
// Gearcloud Labs, 2014
//
// Main parts
// mNode code (ie, WebRTC setup via Mixology)
//
// Video effects
// Photo booth - Colors and reflections; see effects.js
// Pause/resume video
//
// To run
// lo... | gearcloudlabs/Mixology | html/controls/sender.js | JavaScript | mit | 6,290 |
// @flow
/* global document */
export default function injectStyles(styles: any) {
const stylesElement = document.createElement('style');
stylesElement.innerText = styles.toString();
return stylesElement;
}
| bbaaxx/big-red-button | src/client/app/helpers/ce-helpers/injectStyles.js | JavaScript | mit | 213 |
import { test , moduleFor } from 'appkit/tests/helpers/module_for';
import Index from 'appkit/routes/index';
moduleFor('route:index', "Unit - IndexRoute");
test("it exists", function(){
ok(this.subject() instanceof Index);
});
| cevn/tasky-web | tests/unit/routes/index_test.js | JavaScript | mit | 233 |
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
"use strict";
const asyncLib = require("neo-async");
const Tapable = require("tapable").Tapable;
const AsyncSeriesWaterfallHook = require("tapable").AsyncSeriesWaterfallHook;
const SyncWaterfallHook = require(... | msherer95/tastir | node_modules/webpack/lib/NormalModuleFactory.js | JavaScript | mit | 13,406 |
// ==UserScript==
// @name Youtube BPM Meter
// @version 1.3
// @updateURL https://raw.githubusercontent.com/Greeniac916/YoutubeBPM/master/youtube-bpm.js
// @description Plugin adding beat counter to Youtube
// @author Greeniac916
// @match https://www.youtube.com/*
// @grant none
/... | Greeniac916/YoutubeBPM | youtube-bpm.js | JavaScript | mit | 2,514 |
/**
* Copyright (c) 2015-present, Pavel Aksonov
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import React, {
Component,
PropTypes,
} from 'react';
import NavigationExperimental from 'react-nativ... | Stoneski93/GymDiary | node_modules/react-native-router-flux/src/Router.js | JavaScript | mit | 3,008 |
var helper = require(__dirname + '/../test-helper');
var CopyFromStream = require(__dirname + '/../../../lib/copystream').CopyFromStream;
var ConnectionImitation = function () {
this.send = 0;
this.hasToBeSend = 0;
this.finished = 0;
};
ConnectionImitation.prototype = {
endCopyFrom: function () {
... | xhhjin/heroku-ghost | node_modules/pg/test/unit/copystream/copyfrom-tests.js | JavaScript | mit | 4,368 |
function main () {
const ad_el = document.getElementById('bsa-cpc')
if (!ad_el || innerWidth < 800) {
// if no ad element or element hidden, don't load buysellads
return
}
const script = document.createElement('script')
script.onload = () => {
if (_bsa.isMobile()) {
// bsa doesn't show ads o... | samuelcolvin/pydantic | docs/extra/ad.js | JavaScript | mit | 671 |
var g_data;
var margin = {top: 40, right: 45, bottom: 60, left: 60},
width = 460 - margin.left - margin.right,
height = 436 - margin.top - margin.bottom;
var xValue = function(d) { return d.condition;};
var x = d3.scalePoint().range([20, width-20])
var xAxis = d3.axisBottom()
.scale(x);
x.domain(["... | neavemj/neavemj.github.io | matts_js/rab_gene_scatter.js | JavaScript | mit | 4,829 |
import React from 'react';
import ReactDOM from 'react-dom';
import ReactDOMServer from 'react-dom/server';
import { Router, RouterContext, match, browserHistory, createMemoryHistory } from 'react-router';
import HtmlBase from './pages/html-base';
import routes from './routes';
if (typeof document !== 'undefined') {
... | loganwedwards/react-static-boilerplate | index.js | JavaScript | mit | 928 |
/**
* Template literals are a way to more easily achieve string concatenation.
* Template literals are defined using back ticks (``).
* Placeholders are indicated by using a ${variable}
* Function tags are used to reference functions. Tags are a very handy featurs as they can
* be used to protect against cross-sit... | jagretz/playground | es6/template-literals.js | JavaScript | mit | 1,170 |
export function up(queryInterface, Sequelize) {
return Promise.all([
queryInterface.changeColumn('memberships', 'approved', {
type: Sequelize.BOOLEAN,
defaultValue: null,
}),
queryInterface.changeColumn('quotes', 'approved', {
type: Sequelize.BOOLEAN,
defaultValue: null,
}),
... | rit-sse/node-api | db/migrations/20151021114814-default-null.js | JavaScript | mit | 657 |
import express from 'express';
import path from 'path';
let app = express();
/*** Webpack imports ***/
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import config from './webpack.config.js';
const webpackOptions = {
publicPath: config.output.publicPath,
... | natac13/Tic-Tac-Toe-Game | server.js | JavaScript | mit | 1,257 |
///@INFO: UNCOMMON
// This Component shows the possibility of using another Render Engine within WebGLStudio.
// The idea here is to create a component that calls the other render engine renderer during my rendering method
function ThreeJS( o )
{
this.enabled = true;
this.autoclear = true; //clears the scene on... | jagenjo/litescene.js | src/addons/scripts/threeJS.js | JavaScript | mit | 7,669 |
'use strict';
var path = require('path')
, chai = require('chai')
, expect = chai.expect
, sumChildren = require(path.join(__dirname, '..', 'lib', 'util', 'sum-children'))
;
describe("simplifying timings lists", function () {
it("should correctly reduce a simple list", function (... | quantumlicht/collarbone | node_modules/newrelic/test/sum-children.test.js | JavaScript | mit | 1,679 |
import $ from 'jquery';
let hoverChildDirective = {
bind: (el, binding) => {
$(el)
.on('mouseenter', function(event) {
$(el).children('.icon').addClass(binding.value);
})
.on('mouseleave', function(event) {
$(el).children('.icon').removeCl... | skluck/skill-survey | src/directives/hover-child.js | JavaScript | mit | 398 |
var searchData=
[
['size_0',['size',['../struct_vma_allocation_info.html#aac76d113a6a5ccbb09fea00fb25fd18f',1,'VmaAllocationInfo::size()'],['../struct_vma_virtual_block_create_info.html#a670ab8c6a6e822f3c36781d79e8824e9',1,'VmaVirtualBlockCreateInfo::size()'],['../struct_vma_virtual_allocation_create_info.html#aae087... | GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator | docs/html/search/variables_9.js | JavaScript | mit | 906 |
var theServersDao = require('../daos/ServersDao');
var ServerMatcherMiddleware = function (pReq, pRes, pNext) {
'use strict';
var ip = pReq.headers['x-forwarded-for'] || pReq.connection.remoteAddress;
theServersDao.getServerIdByIp(ip, function (pData) {
if (pData.error) {
var server =... | codyseibert/random | stethoscope/src/middleware/ServerMatcherMiddleware.js | JavaScript | mit | 662 |
!(function() {
'use strict';
function ComponentLoader($window, $q) {
var self = this;
this.basePath = '.';
this.queue = [ /*{path: '.', name: 'svg-viewer', scripts:['lazy.js'], run: function(){}}*/ ];
this.loaded = { /*'svg-viewer':true'*/ };
this.loadAll = function() {
var comp... | MrCrimp/lazy-components | src/lazy-components.js | JavaScript | mit | 2,555 |
var url = require('url')
, path = require('path')
, fs = require('fs')
, utils = require('./utils')
, EventEmitter = require('events').EventEmitter
exports = module.exports = Context
function Context(app, req, res) {
var self = this
this.app = app
this.req = req
this.res = res
this.done = ... | buunguyen/starweb | lib/context.js | JavaScript | mit | 4,494 |
var express = require('express');
var soapSave = require('../utils/soa_save_esig')('http://192.168.0.6:8001/soa-infra/services/default/SignatureService/SignatureService_ep?WSDL');
var router = express.Router();
/* GET users listing. */
router.get('/', function(req, res) {
var sig = req.query;
console.log(sig)... | taenaive/CACSignature | routes/frontEndRoute.js | JavaScript | mit | 1,544 |
// Underscore.js 1.4.3
// http://underscorejs.org
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the... | ninjascience/grid-deck | js/lib/underscore.js | JavaScript | mit | 45,566 |
// Regular expression that matches all symbols in the Linear B Syllabary block as per Unicode v5.1.0:
/\uD800[\uDC00-\uDC7F]/; | mathiasbynens/unicode-data | 5.1.0/blocks/Linear-B-Syllabary-regex.js | JavaScript | mit | 126 |
var express = require('express');
var path = require('path');
var favicon = require('serve-favicon');
var logger = require('morgan');
var Session = require('express-session');
var cookieParser = require('cookie-parser');
var bodyParser = require('body-parser');
// create session middleware
var session = Session({
... | nettee/PortCityDefender | server/src/app.js | JavaScript | mit | 5,613 |
require.config( {
//By default load any module IDs from js/lib
baseUrl: "app/",
//except, if the module ID starts with "app",
//load it from the js/app directory. paths
//config is relative to the baseUrl, and
//never includes a ".js" extension since
//the paths config could be for a direct... | mangeg/dota2test | Dota2Test/src/Dota2.WebApp/wwwroot/init.js | JavaScript | mit | 597 |
import Ember from 'ember';
import ApplicationSerializer from 'ghost-admin/serializers/application';
import EmbeddedRecordsMixin from 'ember-data/serializers/embedded-records-mixin';
const {String: {pluralize}} = Ember;
export default ApplicationSerializer.extend(EmbeddedRecordsMixin, {
attrs: {
roles: {em... | dbalders/Ghost-Admin | app/serializers/user.js | JavaScript | mit | 1,202 |
const type = {
name: "array",
structure: [
{ name: "type", match: "^array$" },
{ name: "content" },
],
child: "content",
identify,
validate,
next,
execute,
};
module.exports = type;
function identify({ current }) {
const regexp = new RegExp("^array$");
if (current.content &&
current.type &&
Object.k... | Noxs/SmashJsServerless | lib/core/filter/mergeRule/actions/array.js | JavaScript | mit | 1,439 |