Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
Metadata | 📇 :card_index: |
Documentation | 📚 :books: |
Documenting source code | 💡 :bulb: |
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
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) { |
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
"*": | |
"atom-easy-jsdoc": | |
beta: true | |
useReturns: true | |
core: | |
disabledPackages: [ | |
"spell-check" | |
] | |
ignoredNames: [ | |
".git" |
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
function magic() { | |
let a = 1; | |
a = 2; | |
let b = innerMagic(); | |
a = 3; | |
return b; | |
function innerMagic() { | |
return a; |
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 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> |
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 'whatwg-fetch'; | |
/** | |
* Parses the JSON returned by a network request | |
* | |
* @param {object} response A response from a network request | |
* | |
* @return {object} The parsed JSON from the request | |
*/ | |
function parseJSON(response) { |
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
String.prototype.duplicate = (num) = { | |
let str = ""; | |
for(let i=0; i<num; i++){ | |
str += this; | |
} | |
return str; | |
}; | |
const log = (e, title=null) => { |
NewerOlder