Skip to content

Instantly share code, notes, and snippets.

View klinyecviktor's full-sized avatar
💻
Working hard

Victor Klynets klinyecviktor

💻
Working hard
View GitHub Profile

Keybase proof

I hereby claim:

  • I am klinyecviktor on github.
  • I am klinyecviktor (https://keybase.io/klinyecviktor) on keybase.
  • I have a public key ASCnOXSjWA2-hAiCzMHnTSIJ1Y_Eb29Gk4yoKSAVEPrzLQo

To claim this, I am signing this object:

passport.use(new LocalStrategy((async (username, password, done) => {
try {
const user = await User.getUserByUsername(username);
if (!user) return done(null, false, { message: 'Unknown User' });
const isMatch = await User.comparePassword(password, user.password)
if (isMatch) return done(null, userStore);
const UNKNOWN_MESSAGE = 'Unknown User';
const INVALID_MESSAGE = 'Invalid password';
passport.use(new LocalStrategy(((username, password, done) => {
let userStore;
User.getUserByUsername(username).then((user) => {
if (!user) {
return done(null, false, { message: UNKNOWN_MESSAGE });
}
@klinyecviktor
klinyecviktor / folder.md
Created May 26, 2017 14:16
Folder structure
- /src
  - /routes
  - /utils
  - /constants
  - /queries (here we will include our components probably)
  - /mutations
  - Environment.js
  - app.js
- /configs
var list = readList();
var nextListItem = function() {
var item = list.pop();
if (item) {
// process the list item...
nextListItem();
}
};
@klinyecviktor
klinyecviktor / Test.js
Last active December 8, 2016 18:40
Technical Interview
var a = function() {
for (var i = 0; i < 10; i++) {
setTimeout(function () {
console.log(i);
})
}
}
a();