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
// jslint configuration | |
/*jslint browser: true */ | |
/*global $, window */ | |
var console = console || { | |
log:function() {}, | |
warn: function() {}, | |
dir: function() {}, | |
error: function() {} | |
}; |
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
# Usage:: | |
# | |
# bin/buildout -c watchout.cfg | |
# source bin/activate | |
# projectwatch src/my.project | |
# deactivate | |
# | |
# See also: https://github.com/epeli/Projectwatch | |
[buildout] |
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
namespace :jshint do | |
task :require do | |
sh "which jshint" do |ok, res| | |
fail 'Cannot find jshint on $PATH' unless ok | |
end | |
end | |
task :check => 'jshint:require' do | |
project_root = File.expand_path('../../', File.dirname(__FILE__)) | |
config_file = File.join(project_root, 'config', 'jshint.json') |
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
require 'etc' | |
require 'fileutils' | |
require 'vagrant' | |
task :default => :usage | |
task :usage do | |
puts "You forgot to tell the computer what to do; try one of these commands:" |
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 Gauge(placeholderName, configuration) | |
{ | |
this.placeholderName = placeholderName; | |
var self = this; // some internal d3 functions do not "like" the "this" keyword, hence setting a local variable | |
this.configure = function(configuration) | |
{ | |
this.config = configuration; |
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 user = { | |
validateCredentials: function (username, password) { | |
return ( | |
(!(username += '') || username === '') ? { error: "No Username Given.", field: 'name' } | |
: (!(username += '') || password === '') ? { error: "No Password Given.", field: 'pass' } | |
: (username.length < 3) ? { error: "Username is less than 3 Characters.", field: 'name' } | |
: (password.length < 4) ? { error: "Password is less than 4 Characters.", field: 'pass' } | |
: (!/^([a-z0-9-_]+)$/i.test(username)) ? { error: "Username contains invalid characters.", field: 'name' } | |
: 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
var mongoose = require('mongoose'); | |
mongoose.connect('localhost', 'testing_multiTenant'); | |
/** | |
* User schema. | |
*/ | |
var UserSchema = new mongoose.Schema({ | |
name: String | |
, prefix: { type: String, required: 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
[warn] :::::::::::::::::::::::::::::::::::::::::::::: | |
[warn] :: UNRESOLVED DEPENDENCIES :: | |
[warn] :::::::::::::::::::::::::::::::::::::::::::::: | |
[warn] :: com.jsuereth#sbt-site-plugin;0.4.0: not found | |
[warn] :::::::::::::::::::::::::::::::::::::::::::::: | |
[warn] | |
[warn] Note: Some unresolved dependencies have extra attributes. Check that these dependencies exist with the requested attributes. | |
[warn] com.jsuereth:sbt-site-plugin:0.4.0 (sbtVersion=0.11.2, scalaVersion=2.9.1) | |
[warn] | |
[error] {git://github.com/jsuereth/xsbt-ghpages-plugin.git}sbt-ghpages-plugin/*:update: sbt.ResolveException: unresolved dependency: com.jsuereth#sbt-site-plugin;0.4.0: not found |
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
require("v8-profiler") | |
var express = require('express'), | |
passport = require('passport'), | |
path = require('path'), | |
http = require('http'), | |
url = require('url'), | |
DropboxClient = require('dropbox').DropboxClient, | |
MongoStore = require('connect-mongo')(express), | |
mongoose = require('mongoose'), | |
Schema = mongoose.Schema, |
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
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({ | |
options: { | |
debug: false | |
}, | |
tileSize: 256, | |
initialize: function (options) { | |
L.Util.setOptions(this, options); |