Merge branch 'staging' of https://github.com/FreeCodeCamp/freecodecamp into greasan-translateDE
This commit is contained in:
@ -8,6 +8,8 @@ module.exports = function(User) {
|
|||||||
// see:
|
// see:
|
||||||
// https://github.com/strongloop/loopback/issues/1137#issuecomment-109200135
|
// https://github.com/strongloop/loopback/issues/1137#issuecomment-109200135
|
||||||
delete User.validations.email;
|
delete User.validations.email;
|
||||||
|
// set salt factor for passwords
|
||||||
|
User.settings.saltWorkFactor = 5;
|
||||||
debug('setting up user hooks');
|
debug('setting up user hooks');
|
||||||
// send verification email to new camper
|
// send verification email to new camper
|
||||||
User.afterRemote('create', function(ctx, user, next) {
|
User.afterRemote('create', function(ctx, user, next) {
|
||||||
|
@ -44,7 +44,8 @@
|
|||||||
"username": {
|
"username": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"lowercase": true,
|
"lowercase": true,
|
||||||
"trim": true
|
"trim": true,
|
||||||
|
"id": true
|
||||||
},
|
},
|
||||||
"bio": {
|
"bio": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@ -226,7 +227,18 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"validations": [],
|
"validations": [],
|
||||||
"relations": {},
|
"relations": {
|
||||||
|
"credentials": {
|
||||||
|
"type": "hasMany",
|
||||||
|
"model": "userCredential",
|
||||||
|
"foreignKey": ""
|
||||||
|
},
|
||||||
|
"identities": {
|
||||||
|
"type": "hasMany",
|
||||||
|
"model": "userIdentity",
|
||||||
|
"foreignKey": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
"acls": [
|
"acls": [
|
||||||
{
|
{
|
||||||
"accessType": "*",
|
"accessType": "*",
|
||||||
@ -242,5 +254,5 @@
|
|||||||
"property": "doesExist"
|
"property": "doesExist"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"methods": ["login"]
|
"methods": []
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,12 @@
|
|||||||
"difficulty": 0.44,
|
"difficulty": 0.44,
|
||||||
"challengeSeed": ["119657641"],
|
"challengeSeed": ["119657641"],
|
||||||
"description": [
|
"description": [
|
||||||
|
"Please note that the video for this challenge is a little outdated, and doesn't perfectly match these steps. We plan to record a new video soon.",
|
||||||
"OK, we're finally ready to start pair programming!",
|
"OK, we're finally ready to start pair programming!",
|
||||||
"Pair Programming is where two people code together on the same computer. It is an efficient way to collaborate, and widely practiced at software companies. Pair Programming is one of the core concepts of \"Agile\" Software Development, which you will hear more about later.",
|
"Pair Programming is where two people code together on the same computer. It is an efficient way to collaborate, and widely practiced at software companies. Pair Programming is one of the core concepts of \"Agile\" Software Development, which you will hear more about later.",
|
||||||
"Many people use Skype or Google Hangouts to pair program, but if you talk with professional software engineers, they will tell you that it's not really pair programming unless both people have the ability to use the keyboard and mouse.",
|
"Many people use Skype or Google Hangouts to pair program, but if you talk with professional software engineers, they will tell you that it's not really pair programming unless both people have the ability to use the keyboard and mouse.",
|
||||||
"The most popular tool for pair programming is Screen Hero. You can download Screen Hero for <a href='http://links.screenhero.com/e/c/eyJlbWFpbF9pZCI6Ik1qQTNNem9XQkNJQ1pBQUNjd0FYQVZrVEdnRkxNamtfX0JWZEdGVEpSZkVCWlRwbFpXRTBNamM0WVMxaE56SmlMVEV4WlRRdE9HUXpZUzFpWXpVNE1HRTJNalkxTldNNk1UUTJNVEEyQUE9PSIsInBvc2l0aW9uIjowLCJocmVmIjoiaHR0cDovL2RsLnNjcmVlbmhlcm8uY29tL3NtYXJ0ZG93bmxvYWQvZklYQU1UUUJBTEtQQkhQTC9TY3JlZW5oZXJvLnppcD9zb3VyY2U9d2ViIn0=' target='_blank'>Mac</a> or <a href='http://links.screenhero.com/e/c/eyJlbWFpbF9pZCI6Ik1qQTNNem9XQkNJQ1pBQUNjd0FYQVZrVEdnRkxNamtfX0JWZEdGVEpSZkVCWlRwbFpXRTBNamM0WVMxaE56SmlMVEV4WlRRdE9HUXpZUzFpWXpVNE1HRTJNalkxTldNNk1UUTJNVEEyQUE9PSIsInBvc2l0aW9uIjoxLCJocmVmIjoiaHR0cDovL2RsLnNjcmVlbmhlcm8uY29tL3NtYXJ0ZG93bmxvYWQvZklYQU1UUUJBTEtQQkhQTC9TY3JlZW5oZXJvLXNldHVwLmV4ZSJ9' target='_blank'>Windows</a>. Create your new user account from within the app.",
|
"The most popular tool for pair programming is Screen Hero. You can download Screen Hero for <a href='http://links.screenhero.com/e/c/eyJlbWFpbF9pZCI6Ik1qQTNNem9XQkNJQ1pBQUNjd0FYQVZrVEdnRkxNamtfX0JWZEdGVEpSZkVCWlRwbFpXRTBNamM0WVMxaE56SmlMVEV4WlRRdE9HUXpZUzFpWXpVNE1HRTJNalkxTldNNk1UUTJNVEEyQUE9PSIsInBvc2l0aW9uIjowLCJocmVmIjoiaHR0cDovL2RsLnNjcmVlbmhlcm8uY29tL3NtYXJ0ZG93bmxvYWQvZklYQU1UUUJBTEtQQkhQTC9TY3JlZW5oZXJvLnppcD9zb3VyY2U9d2ViIn0=' target='_blank'>Mac</a> or <a href='http://links.screenhero.com/e/c/eyJlbWFpbF9pZCI6Ik1qQTNNem9XQkNJQ1pBQUNjd0FYQVZrVEdnRkxNamtfX0JWZEdGVEpSZkVCWlRwbFpXRTBNamM0WVMxaE56SmlMVEV4WlRRdE9HUXpZUzFpWXpVNE1HRTJNalkxTldNNk1UUTJNVEEyQUE9PSIsInBvc2l0aW9uIjoxLCJocmVmIjoiaHR0cDovL2RsLnNjcmVlbmhlcm8uY29tL3NtYXJ0ZG93bmxvYWQvZklYQU1UUUJBTEtQQkhQTC9TY3JlZW5oZXJvLXNldHVwLmV4ZSJ9' target='_blank'>Windows</a>. Create your new user account from within the app.",
|
||||||
"We have a special chat room for people ready to pair program. Go to our Slack chat room, navigate to the #letspair channel and type \"Hello Pair Programmers!\"",
|
"We have a special chat room for people ready to pair program. Go to our <a href='http://freecodecamp.slack.com/messages/letspair'>http://freecodecamp.slack.com/messages/letspair</a> and type \"Hello Pair Programmers!\"",
|
||||||
"If someone is available, they will be your \"pair\" - the person you pair programming with.",
|
"If someone is available, they will be your \"pair\" - the person you pair programming with.",
|
||||||
"If no one gets back to you in the first few minutes, don't worry. There will be lots of opportunities to pair program in the future.",
|
"If no one gets back to you in the first few minutes, don't worry. There will be lots of opportunities to pair program in the future.",
|
||||||
"If someone does get back to you, private message them and ask for the email address they used to register Screen Hero.",
|
"If someone does get back to you, private message them and ask for the email address they used to register Screen Hero.",
|
||||||
|
@ -201,7 +201,7 @@
|
|||||||
],
|
],
|
||||||
"tests": [
|
"tests": [
|
||||||
"assert(($('h1').length === 0), 'Comment out your <code>h1</code> element so that it is not visible on your page.')",
|
"assert(($('h1').length === 0), 'Comment out your <code>h1</code> element so that it is not visible on your page.')",
|
||||||
"assert(($('h2').length > 0), 'Leave your <code>h2</code> element uncommented so that is not visible on your page.')",
|
"assert(($('h2').length > 0), 'Leave your <code>h2</code> element uncommented so that it is visible on your page.')",
|
||||||
"assert(($('p').length === 0), 'Comment out your <code>p</code> element so that it is not visible on your page.')",
|
"assert(($('p').length === 0), 'Comment out your <code>p</code> element so that it is not visible on your page.')",
|
||||||
"assert(editor.match(/-->/g).length > 1, 'Be sure to close each of your comments with <code>--></code>.')"
|
"assert(editor.match(/-->/g).length > 1, 'Be sure to close each of your comments with <code>--></code>.')"
|
||||||
],
|
],
|
||||||
@ -1304,7 +1304,7 @@
|
|||||||
"assert($('ul').length > 0, 'Create a <code>ul</code> element.')",
|
"assert($('ul').length > 0, 'Create a <code>ul</code> element.')",
|
||||||
"assert($('li').length > 2, 'Add three <code>li</code> elements to your <code>ul</code> element.')",
|
"assert($('li').length > 2, 'Add three <code>li</code> elements to your <code>ul</code> element.')",
|
||||||
"assert(editor.match(/<\\/ul>/g) && editor.match(/<ul/g) && editor.match(/<\\/ul>/g).length === editor.match(/<ul/g).length, 'Make sure your <code>ul</code> element has a closing tag.')",
|
"assert(editor.match(/<\\/ul>/g) && editor.match(/<ul/g) && editor.match(/<\\/ul>/g).length === editor.match(/<ul/g).length, 'Make sure your <code>ul</code> element has a closing tag.')",
|
||||||
"assert(editor.match(/<\\/li>/g) && editor.match(/<li/g) && editor.match(/<\\/li>/g).length === editor.match(/<li/g).length, 'Make sure your <code>li</code> element has a closing tag.')"
|
"assert(editor.match(/<\\/li>/g) && editor.match(/<li>/g) && editor.match(/<\\/li>/g).length === editor.match(/<li>/g).length, 'Make sure your <code>li</code> element has a closing tag.')"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
||||||
@ -1372,7 +1372,7 @@
|
|||||||
"assert($('li').length > 5, 'You should have three <code>li</code> elements within your <code>ol</code> element.')",
|
"assert($('li').length > 5, 'You should have three <code>li</code> elements within your <code>ol</code> element.')",
|
||||||
"assert(editor.match(/<\\/ul>/g) && editor.match(/<\\/ul>/g).length === editor.match(/<ul>/g).length, 'Make sure your <code>ul</code> element has a closing tag.')",
|
"assert(editor.match(/<\\/ul>/g) && editor.match(/<\\/ul>/g).length === editor.match(/<ul>/g).length, 'Make sure your <code>ul</code> element has a closing tag.')",
|
||||||
"assert(editor.match(/<\\/ol>/g) && editor.match(/<\\/ol>/g).length === editor.match(/<ol>/g).length, 'Make sure your <code>ol</code> element has a closing tag.')",
|
"assert(editor.match(/<\\/ol>/g) && editor.match(/<\\/ol>/g).length === editor.match(/<ol>/g).length, 'Make sure your <code>ol</code> element has a closing tag.')",
|
||||||
"assert(editor.match(/<\\/li>/g) && editor.match(/<\\/li>/g).length === editor.match(/<li>/g).length, 'Make sure your <code>li</code> element has a closing tag.')"
|
"assert(editor.match(/<\\/li>/g) && editor.match(/<li>/g) && editor.match(/<\\/li>/g).length === editor.match(/<li>/g).length, 'Make sure your <code>li</code> element has a closing tag.')"
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
"<link href='http://fonts.googleapis.com/css?family=Lobster' rel='stylesheet' type='text/css'>",
|
||||||
|
@ -394,6 +394,8 @@
|
|||||||
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.lagos/' target='_blank'>Lagos</a></li>",
|
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.lagos/' target='_blank'>Lagos</a></li>",
|
||||||
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.lahore/' target='_blank'>Lahore</a></li>",
|
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.lahore/' target='_blank'>Lahore</a></li>",
|
||||||
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.leesburg/' target='_blank'>Leesburg</a></li>",
|
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.leesburg/' target='_blank'>Leesburg</a></li>",
|
||||||
|
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.lehi/' target='_blank'>Lehi</a></li>",
|
||||||
|
" <li class='large-li'><a href='https://www.facebook.com/groups/Free.Code.Camp.Lima/' target='_blank'>Lima</a></li>",
|
||||||
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.limassol/' target='_blank'>Limassol</a></li>",
|
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.limassol/' target='_blank'>Limassol</a></li>",
|
||||||
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.london/' target='_blank'>London</a></li>",
|
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.london/' target='_blank'>London</a></li>",
|
||||||
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.los.angeles/' target='_blank'>Los Angeles</a></li>",
|
" <li class='large-li'><a href='https://www.facebook.com/groups/free.code.camp.los.angeles/' target='_blank'>Los Angeles</a></li>",
|
||||||
@ -499,32 +501,6 @@
|
|||||||
"</div>"
|
"</div>"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"id": "bd7158d9c436eddfaeb5bd3e",
|
|
||||||
"name": "Does Free Code Camp have an alumni network?",
|
|
||||||
"dashedName": "does-free-code-camp-have-an-alumni-network",
|
|
||||||
"description": [
|
|
||||||
"<div class=\"col-xs-12 col-sm-10 col-sm-offset-1\">",
|
|
||||||
" <h3>We have a growing <a href='https://www.linkedin.com/grp/home?gid=6966827' target='_blank'>alumni network on LinkedIn</a>. Once you've finished Free Code Camp and have gotten a coding job, we'd love to include you in this group, too!</h3>",
|
|
||||||
"</div>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"id": "bd7158d9c442eddfaeb5b2ef",
|
|
||||||
"name": "Why doesn't Free Code Camp teach technical interviewing skills?",
|
|
||||||
"dashedName": "why-doesnt-free-code-camp-teach-technical-interviewing-skills",
|
|
||||||
"description": [
|
|
||||||
"<div class=\"col-xs-12 col-sm-10 col-sm-offset-1\">",
|
|
||||||
" <h3>The skills you'll need to succeed in the job interview are quite different from the skills you'll need to succeed on the job.</h3><br>",
|
|
||||||
" <p class='large-p'>Employers are gradually moving to a pair-programming interview format. You don't need to make special preparations for these types of interviews - just pair program like you would on any Free Code Camp project.</p>",
|
|
||||||
" <p class='large-p'>If you intend to apply for a job at older tech companies like Apple, Microsoft, Google, Facebook or Amazon, you should prepare for your interviews by working through this single authoritative book: </p>",
|
|
||||||
" <img src='http://a3.mzstatic.com/us/r1000/095/Purple/3f/58/42/mzl.xypmpeal.320x480-75.jpg' class='img-center img-responsive'>",
|
|
||||||
" <p class='large-p'>You can download the 4th edition of this book in PDF form for free <a href='http://www.mktechnicalclasses.com/Notes/Cracking%20the%20Coding%20Interview,%204%20Edition%20-%20150%20Programming%20Interview%20Questions%20and%20Solutions.pdf' target='_blank'>here</a> or buy the 5th edition of the book <a href='http://www.amazon.com/gp/product/098478280X/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=098478280X&linkCode=as2&tag=out0b4b-20&linkId=4LOZ5JGICYZJO33D' target='_blank'>here</a>.",
|
|
||||||
" <p class='large-p'>Many of the questions you'll be asked during your interviews will come straight out of this book, which is standard-issue in Silicon Valley.</p>",
|
|
||||||
" <p class='large-p'>We may focus more on interview preparation in the future if we determine that it's necessary. In the mean time, Free Code Camp will continue to focus skills that are directly related to becoming a job-ready software engineer.",
|
|
||||||
"</div>"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"id": "bd7158d9c442eddfaeb5bdef",
|
"id": "bd7158d9c442eddfaeb5bdef",
|
||||||
"name": "How do I best use the Global Control Shortcuts for Mac?",
|
"name": "How do I best use the Global Control Shortcuts for Mac?",
|
||||||
|
@ -1,32 +1,36 @@
|
|||||||
var Rx = require('rx');
|
var Rx = require('rx');
|
||||||
var debug = require('debug')('freecc:user:remote');
|
var debug = require('debug')('freecc:user:remote');
|
||||||
|
|
||||||
function destroyById(id, Model) {
|
function destroyAllRelated(id, Model) {
|
||||||
return Rx.Observable.create(function(observer) {
|
return Rx.Observable.fromNodeCallback(
|
||||||
Model.destroyById(id, function(err) {
|
Model.destroyAll,
|
||||||
if (err) { return observer.onError(err); }
|
Model
|
||||||
observer.onCompleted();
|
)({ userId: id });
|
||||||
});
|
|
||||||
return Rx.Disposable(Rx.helpers.noop);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function(app) {
|
module.exports = function(app) {
|
||||||
var User = app.models.User;
|
var User = app.models.User;
|
||||||
var UserIdentity = app.models.UserIdentity;
|
var UserIdentity = app.models.UserIdentity;
|
||||||
var UserCredential = app.models.UserCredential;
|
var UserCredential = app.models.UserCredential;
|
||||||
User.observe('after delete', function(ctx, next) {
|
User.observe('before delete', function(ctx, next) {
|
||||||
debug('removing user', ctx.where);
|
debug('removing user', ctx.where);
|
||||||
var id = ctx.where && ctx.where.id ? ctx.where.id : null;
|
var id = ctx.where && ctx.where.id ? ctx.where.id : null;
|
||||||
if (!id) {
|
if (!id) {
|
||||||
return next();
|
return next();
|
||||||
}
|
}
|
||||||
Rx.Observable.combineLatest(
|
Rx.Observable.combineLatest(
|
||||||
destroyById(id, UserIdentity),
|
destroyAllRelated(id, UserIdentity),
|
||||||
destroyById(id, UserCredential),
|
destroyAllRelated(id, UserCredential),
|
||||||
Rx.helpers.noop
|
function(identData, credData) {
|
||||||
|
return {
|
||||||
|
identData: identData,
|
||||||
|
credData: credData
|
||||||
|
};
|
||||||
|
}
|
||||||
).subscribe(
|
).subscribe(
|
||||||
Rx.helpers.noop,
|
function(data) {
|
||||||
|
debug('deleted', data);
|
||||||
|
},
|
||||||
function(err) {
|
function(err) {
|
||||||
debug('error deleting user %s stuff', id, err);
|
debug('error deleting user %s stuff', id, err);
|
||||||
next(err);
|
next(err);
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
"restApiRoot": "/api",
|
"restApiRoot": "/api",
|
||||||
"host": "0.0.0.0",
|
"host": "0.0.0.0",
|
||||||
"port": 3000,
|
"port": 3000,
|
||||||
"legacyExplorer" : false,
|
"legacyExplorer": false,
|
||||||
"remoting": {
|
"remoting": {
|
||||||
"context": {
|
"context": {
|
||||||
"enableHttpContext": false
|
"enableHttpContext": false
|
||||||
|
@ -31,6 +31,21 @@ block content
|
|||||||
.col-xs-12
|
.col-xs-12
|
||||||
h2 Here are some of our previous shows (you can full-screen them):
|
h2 Here are some of our previous shows (you can full-screen them):
|
||||||
.row.negative-20
|
.row.negative-20
|
||||||
|
.col-xs-12.col-sm-12.col-md-6
|
||||||
|
.embed-responsive.embed-responsive-16by9.big-break
|
||||||
|
iframe.embed-responsive-item(src='//www.youtube.com/embed/Z_43xApGB9Y')
|
||||||
|
p.wrappable.negative-45 link:  
|
||||||
|
a(href="http://www.youtube.com/watch/Fn9HMn79KH0") http://www.youtube.com/watch/Z_43xApGB9Y
|
||||||
|
.col-xs-12.col-sm-12.col-md-6
|
||||||
|
.embed-responsive.embed-responsive-16by9.big-break
|
||||||
|
iframe.embed-responsive-item(src='//www.youtube.com/embed/PvWHzcebjjQ')
|
||||||
|
p.wrappable.negative-45 link:  
|
||||||
|
a(href="http://www.youtube.com/watch/Fn9HMn79KH0") http://www.youtube.com/watch/PvWHzcebjjQ
|
||||||
|
.col-xs-12.col-sm-12.col-md-6
|
||||||
|
.embed-responsive.embed-responsive-16by9.big-break
|
||||||
|
iframe.embed-responsive-item(src='//www.youtube.com/embed/yHL6mEr-LGY')
|
||||||
|
p.wrappable.negative-45 link:  
|
||||||
|
a(href="http://www.youtube.com/watch/Fn9HMn79KH0") http://www.youtube.com/watch/yHL6mEr-LGY
|
||||||
.col-xs-12.col-sm-12.col-md-6
|
.col-xs-12.col-sm-12.col-md-6
|
||||||
.embed-responsive.embed-responsive-16by9.big-break
|
.embed-responsive.embed-responsive-16by9.big-break
|
||||||
iframe.embed-responsive-item(src='//www.youtube.com/embed/dolG-yRMcPs')
|
iframe.embed-responsive-item(src='//www.youtube.com/embed/dolG-yRMcPs')
|
||||||
@ -46,11 +61,6 @@ block content
|
|||||||
iframe.embed-responsive-item(src='//www.youtube.com/embed/bbFVxaza8Ik')
|
iframe.embed-responsive-item(src='//www.youtube.com/embed/bbFVxaza8Ik')
|
||||||
p.wrappable.negative-45 link:  
|
p.wrappable.negative-45 link:  
|
||||||
a(href="http://www.youtube.com/watch/S7iRBZJwOAs") http://www.youtube.com/watch/bbFVxaza8Ik
|
a(href="http://www.youtube.com/watch/S7iRBZJwOAs") http://www.youtube.com/watch/bbFVxaza8Ik
|
||||||
.col-xs-12.col-sm-12.col-md-6
|
|
||||||
.embed-responsive.embed-responsive-16by9.big-break
|
|
||||||
iframe.embed-responsive-item(src='//www.youtube.com/embed/6okiEBZ2y-Y')
|
|
||||||
p.wrappable.negative-45 link:  
|
|
||||||
a(href="http://www.youtube.com/watch/BHNRg39ZblE") http://www.youtube.com/watch/6okiEBZ2y-Y
|
|
||||||
br
|
br
|
||||||
br
|
br
|
||||||
br
|
br
|
||||||
|
Reference in New Issue
Block a user