Skip to content

Instantly share code, notes, and snippets.

View brandonsueur's full-sized avatar

brandonsueur

View GitHub Profile
@brandonsueur
brandonsueur / bcrypt-promise.js
Created August 24, 2018 08:27 — forked from dmh2000/bcrypt-promise.js
Using bcrypt with promises to hash a password and then verify it
let bcrypt = require('bcrypt-nodejs');
let password = "hello";
let stored_hash = "";
// first generate a random salt
function genSalt(password) {
return new Promise((resolve,reject) => {
bcrypt.genSalt(10,function(err,salt) {
if (err) {
@brandonsueur
brandonsueur / Projects.js
Last active May 23, 2018 16:40 — forked from bloodyowl/.js
💼 Small code for list my projects ~ Portfolio
import React from "react";
import ReactDOM from "react-dom";
const Title = ({ children }) => <h1 className="Title">{children}</h1>
const Section = ({ title, children }) => (
<div className="Section">
<Title>{title}</Title>
{children}
</div>