This file contains hidden or 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 parser = document.createElement('a'); | |
| parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
| parser.protocol; // => "http:" | |
| parser.hostname; // => "example.com" | |
| parser.port; // => "3000" | |
| parser.pathname; // => "/pathname/" | |
| parser.search; // => "?search=test" | |
| parser.hash; // => "#hash" | |
| parser.host; // => "example.com:3000" |
This file contains hidden or 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 SBB = $.inherit({ | |
| __constructor : function() { // constructor | |
| console.log('init SBB'); | |
| }, | |
| getUrlVars: function(){ | |
| var vars = [], hash; | |
| var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&'); | |
| for(var i = 0; i < hashes.length; i++) | |
| { |
This file contains hidden or 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 | |
| meta(charset='utf-8') | |
| meta(http-equiv='X-UA-Compatible', content='IE=edge') | |
| meta(name='viewport', content='width=device-width, initial-scale=1.0, user-scalable=no') | |
| meta(name='HandheldFriendly', content='true') | |
| meta(name='description', content='') | |
| meta(name='csrf-token', content=_csrf) | |
| meta(name='author', content='') |
This file contains hidden or 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
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express'); | |
| var cookieParser = require('cookie-parser'); | |
| var compress = require('compression'); | |
| var session = require('express-session'); | |
| var bodyParser = require('body-parser'); | |
| var logger = require('morgan'); |
This file contains hidden or 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
| extends layout | |
| block content | |
| .container.container-fix | |
| .page-header | |
| h3 Contact Form | |
| form.form-horizontal(role='form', method='POST') | |
| input(type='hidden', name='_csrf', value=_csrf) | |
| .form-group |
This file contains hidden or 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
| @import "lib/bootstrap/bootstrap"; | |
| @import "lib/font-awesome/font-awesome"; | |
| @import "lib/ionicons/ionicons"; | |
| @import "lib/bootstrap-social"; | |
| @import "themes/shopbyblog"; | |
| // Scaffolding | |
| // ------------------------- | |
| html { |
This file contains hidden or 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
| // Colors | |
| // ------------------------- | |
| // Base colors | |
| @color-marker: #E74C3C; | |
| @color-silver: #a8a8a8; | |
| @color-silver-dark: rgb(75, 92, 102); | |
| @color-silver-light: rgb(204, 214, 221); | |
| @color-clouds: #F2F2F2; | |
| @color-clouds-light: rgba(242, 242, 242, 0.8); |
This file contains hidden or 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'); | |
| var bcrypt = require('bcrypt-nodejs'); | |
| var crypto = require('crypto'); | |
| var monguurl = require('monguurl'); | |
| var timestamps = require("mongoose-times") | |
| var mongoosePaginate = require('mongoose-paginate') | |
| var ROLE_USER = 1, ROLE_MODERATOR = 2, ROLE_ADMIN = 3; | |
| var VARIANT_USER = 1, VARIANT_BLOGGER = 2, VARIANT_STORE = 3; |
This file contains hidden or 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'); | |
| var Schema = mongoose.Schema; | |
| /* | |
| This document means that the user with numeric id 12345 | |
| has been followed by user 54321 since August 21. | |
| The last scan of user 12345, when user 54321 still showed up | |
| in the followers list, happened at 6am on August 23rd. | |
| At 7:50am that day, user 54321 was no longer following 12345. | |
| A document with no “end” field means that the “follower” is still following the “followee”. |
This file contains hidden or 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 _ = require('lodash'); | |
| var async = require('async'); | |
| var crypto = require('crypto'); | |
| var nodemailer = require('nodemailer'); | |
| var passport = require('passport'); | |
| var secrets = require('../config/secrets'); | |
| var moment = require('moment'); | |
| var User = require('../models/User'); |
OlderNewer