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
router.post('/change-password', middlewares.updateUserProfile, (req, res, next) => { | |
if (req.user.identities[0].isSocial) { | |
return sendError(400, 'Cannot update social account', next); | |
} | |
if (req.body.password !== req.body.confirm) { | |
return sendError(400, 'Password mismatch', next); | |
} | |
return auth0Utils.validatePassword(req.user, req.body.current) |
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 account = CloudStorageAccount.FromConfigurationSetting("DataConnectionString"); | |
CloudTableClient.CreateTablesFromModel( | |
typeof(TableServiceContext), | |
account.TableEndpoint.AbsoluteUri, | |
account.Credentials); |
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
<li class="name"> | |
@Html.LabelFor(m => m.UserName) | |
@Html.TextBoxFor(m => m.UserName) | |
@Html.ValidationMessageFor(m => m.UserName) | |
</li> | |
<li class="name"> | |
@Html.LabelFor(m => m.RegistrationCode) | |
@Html.TextBoxFor(m => m.RegistrationCode) | |
@Html.ValidationMessageFor(m => m.RegistrationCode) | |
</li> |
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
const VARIBALES = { | |
lock_url: 'https://foo.com', | |
manage_url: 'https://manage.foo.com', // these come from env variables on the server | |
account: { | |
client_id: '{{CLIENT_ID}}', | |
client_secret: '{{CLIENT_SECRET}}' | |
}, | |
... | |
} |
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
@import url(https://fonts.googleapis.com/css?family=PT+Sans:400,700); | |
body, .wufoo, .wufoo label.desc, .wufoo legend.desc, .wufoo .info h2, .wufoo .info div, .wufoo input.text, .wufoo textarea.textarea, .wufoo input.file, .wufoo li div, .wufoo li span, .wufoo li div label, .wufoo li span label, .likert caption, .likert thead td, .likert tbody th label, .wufoo .section h3, .wufoo .section div, .paging-context { | |
font-family: "PT Sans", "Helvetica", Helvetica, Arial, sans-serif | |
} | |
#logo { | |
background-color: #008CBA | |
} | |
.wufoo .info h2 { | |
font-size: 180% | |
} |
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 lsr = require('lsr'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var toMarkdown = require('to-markdown'); | |
var striptags = require('striptags'); | |
var mkdirp = require('mkdirp'); | |
var matter = require('gray-matter'); | |
var toTitleCase = require('titlecase'); | |
var beautifyHtml = require('js-beautify').html; |
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 lsr = require('lsr'); | |
var path = require('path'); | |
var fs = require('fs'); | |
var matter = require('gray-matter'); | |
var moment = require('moment'); | |
var files = []; | |
function loadPath(loadPath) { | |
var resolvedPath = path.resolve(__dirname, loadPath); |
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
bundles.UseCdn = true; | |
BundleTable.EnableOptimizations = true; | |
var jquery = new ScriptBundle("~/bundles/jquery", "//ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.1.min.js") | |
.Include("~/Scripts/jquery-{version}.js"); | |
jquery.CdnFallbackExpression = "window.jQuery"; | |
bundles.Add(jquery); |
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
// Setup the Service Bus store for Socket.IO | |
var sbstore = require('socket.io-servicebus'); | |
io.configure(function () { | |
io.set("transports", ["xhr-polling"]); | |
io.set("polling duration", 30); | |
io.set('store', new sbstore({ | |
topic: nconf.get("SERVICE_BUS_TOPIC"), | |
connectionString: nconf.get("CUSTOMCONNSTR_SERVICEBUS"), | |
logger: io.get('logger') | |
})); |
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
public FacebookClient(string appSecret, string appId) | |
{ | |
SendAnalytics(); | |
} | |
private static bool AnaltyicsSent = false; | |
private static object AnalyticsLock = new object(); | |
private void SendAnalytics() | |
{ |