Skip to content

Instantly share code, notes, and snippets.

@chebotiuk
chebotiuk / dbSeed.js
Created March 23, 2018 21:56
Mongoose
var mongoose = require('libs/mongoose')
mongoose.set('debug', true)
var users = [
{
username: 'Admin',
password: 'admin_password'
},
{
username: 'Manager',
@chebotiuk
chebotiuk / Portal.js
Created December 14, 2017 14:24 — forked from bisubus/Portal.js
React 16: Portal
import React from "react";
import PropTypes from "prop-types";
import { createPortal } from "react-dom";
class Portal extends React.Component {
static propTypes = {
children: PropTypes.node,
};
state = { mounted: false };
@chebotiuk
chebotiuk / classHOC.js
Last active December 5, 2017 13:03
React HOC
let DebugComponent = ComponentToDebug => class ComponentNamedDebug extends Component {
render() {
return (
<div className="debug">
<ComponentToDebug {...this.props}/>
</div>
)
}
}
@chebotiuk
chebotiuk / index.html
Last active November 30, 2017 11:42
html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
</body>
</html>