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 express = require('express'); | |
var app = express(); | |
var stylus = require('stylus'); | |
var nib = require('nib'); | |
var documentspath = 'src/dcouments' | |
var docpadInstanceConfiguration = {}; | |
var docpadInstance = require('docpad').createInstance(docpadInstanceConfiguration, function(err,docpadInstance){ | |
if (err) return console.log(err.stack); | |
// ... | |
}); |
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
Folder | |
| Public | |
| | Js | |
| | | app | |
| | | | views | |
| | | | | topbar.js | |
| | | | pages | |
| | | | | main.js | |
| | | libs | |
| | | | backbone.js |
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 bcrypt = require('bcrypt'), | |
SALT_WORK_FACTOR = 10, | |
crypto = require('crypto'), | |
validate = require('mongoose-validator').validate; | |
var Schema = new mongoose.Schema({ | |
name: {type:String,required:true,validate:[validate('len',1,20),validate('regex',/^[A-Za-z ]+$/)]}, | |
password: {type:String,required:true,validate:[validate('len',6,20)]}, | |
username: {type:String,required:true,unique:true,index:true,validate:[validate('len',6,20),validate('regex',/^[a-z A-Z][a-zA-Z0-9_\-]+[a-zA-Z0-9]+$/)]}, | |
email: {type:String,required:true,unique:true,index:true,validate:[validate('isEmail')]}, |
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
define(function(require){ | |
var runFilters = function(filters){ | |
var _ = require('underscore'); | |
var computedFilters = getFilters(filters); | |
var result = _.every(computedFilters,function(filter){ | |
return filter(); | |
}); | |
return result; | |
}; |
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
define(function(require){ | |
var runFilters = function(computedFilters){ | |
var result = _.every(computedFilters,function(filter){ | |
return filter(); | |
}); | |
return result; | |
}; | |
var getFilters = function(filters){ | |
var _ = require('underscore'); |
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
def update_myself | |
@user = current_user | |
role = Role.find(params[:user][:role_ids]) unless params[:user][:role_ids].nil? | |
params[:user] = params[:user].except(:role_ids) | |
if @user.update_attributes(params[:user]) | |
@user.update_plan(role) unless role.nil? | |
render :json => {success:true} | |
else | |
render :json => {success:false} | |
end |
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
/*global TemplateDashboard, $*/ | |
// on close logic | |
Backbone.View.prototype.close = function(){ | |
this.remove(); | |
this.unbind(); | |
} | |
window.TemplateDashboard = { | |
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
/** | |
* Remove diacritics (accent and other marks) on characters, and dissociate double characters. | |
* Based on the character map of http://lehelk.com/2011/05/06/script-to-remove-diacritics/ | |
* but per-character walk (improved performance). | |
* | |
* Licensed under WTFPL v2 http://sam.zoy.org/wtfpl/COPYING | |
*/ | |
var removeDiacritics = (function() { | |
var diacritics = {"\u24B6":"A","\uFF21":"A","\u00C0":"A","\u00C1":"A","\u00C2":"A","\u1EA6":"A","\u1EA4":"A","\u1EAA":"A","\u1EA8":"A","\u00C3":"A","\u0100":"A","\u0102":"A","\u1EB0":"A","\u1EAE":"A","\u1EB4":"A","\u1EB2":"A","\u0226":"A","\u01E0":"A","\u00C4":"A","\u01DE":"A","\u1EA2":"A","\u00C5":"A","\u01FA":"A","\u01CD":"A","\u0200":"A","\u0202":"A","\u1EA0":"A","\u1EAC":"A","\u1EB6":"A","\u1E00":"A","\u0104":"A","\u023A":"A","\u2C6F":"A","\uA732":"AA","\u00C6":"AE","\u01FC":"AE","\u01E2":"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B","\uFF22":"B","\u1E02":"B","\u1E04":"B","\u1E06":"B","\u0243":"B","\u0182":"B","\u0181":"B", |
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
# LoopBack App Base Image | |
# Installs StrongLoop and Git | |
FROM dockerfile/nodejs | |
#Installing Loopback | |
RUN npm install -g strongloop | |
# Installing Git | |
RUN mkdir /data/git-tmp | |
WORKDIR /data/git-tmp |
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
# LoopBack App Base Image | |
FROM 4dstudios/loopback_app_base | |
# Create App Directory and CD into it | |
RUN mkdir /data/app | |
WORKDIR /data/app | |
# Clone Master and Install dependencies | |
RUN git clone https://github.com/Rolilink/remote-job-board.git |
OlderNewer