Skip to content

Instantly share code, notes, and snippets.

View brandonsueur's full-sized avatar

brandonsueur

View GitHub Profile
@brandonsueur
brandonsueur / log.js
Last active May 23, 2018 16:34
👨‍💻Custom console.log()
String.prototype.duplicate = (num) = {
let str = "";
for(let i=0; i<num; i++){
str += this;
}
return str;
};
const log = (e, title=null) => {
@brandonsueur
brandonsueur / readme.md
Last active May 23, 2018 16:35
🗒 Readme for my project Koopy

Koopy

A site to manage your working hours and your holidays !

🚧 in progress

Summary

  • ⚛️ 100% React.
  • ⚡️ Blazing fast performance.
  • 👍 Friendly UI & UX.
  • 🔒 Does not touch user’s data !
@brandonsueur
brandonsueur / request.js
Last active May 23, 2018 16:39
🎢 Small function request() with `whatwg-fetch`
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) {
@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>
@brandonsueur
brandonsueur / release.md
Last active June 6, 2018 17:46
🗒 Model Release

Title

... ... ...

🎉 New features

@brandonsueur
brandonsueur / emoji.md
Created June 8, 2018 07:39
🎉 List of emoji i use for my commits.
Commit type Emoji
Initial commit 🎉 :tada:
Version tag 🔖 :bookmark:
New feature :sparkles:
Bugfix 🐛 :bug:
Metadata 📇 :card_index:
Documentation 📚 :books:
Documenting source code 💡 :bulb:
@brandonsueur
brandonsueur / .js
Created July 12, 2018 13:48
🎉 Test JavaScript
function magic() {
let a = 1;
a = 2;
let b = innerMagic();
a = 3;
return b;
function innerMagic() {
return a;
@brandonsueur
brandonsueur / config.cson
Created August 4, 2018 20:58
📖 My configuration Atom editor
"*":
"atom-easy-jsdoc":
beta: true
useReturns: true
core:
disabledPackages: [
"spell-check"
]
ignoredNames: [
".git"
@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 / keybindings.json
Created September 1, 2018 20:49
📖 My configuration VSCode
[
{
"key": "cmd+l",
"command": "expandLineSelection",
}
]