Skip to content

Instantly share code, notes, and snippets.

View giacomorebonato's full-sized avatar

Giacomo Rebonato giacomorebonato

View GitHub Profile
@giacomorebonato
giacomorebonato / index.ts
Created July 12, 2016 10:02
Stores instantiation
import AuthStore from './AuthStore'
import NotificationsStore from './NotificationsStore'
import SampleStore from './SampleStore'
import UIStore from './UIStore'
const notificationsStore = new NotificationsStore()
const stores = {
notificationsStore,
authStore: new AuthStore(notificationsStore),
@giacomorebonato
giacomorebonato / sequelize-schema-file-generator.js
Last active October 18, 2019 20:32 — forked from manuelbieh/sequelize-schema-file-generator.js
Automatically generates migration files from your sequelize models
import db from './models'
import del from 'del'
import fs from 'fs'
import path from 'path'
let { sequelize } = db
const migrations_path = path.join(__dirname, '/migrations/')
del([migrations_path])
.then(() => {
var path = require('path')
module.exports = {
'config': path.resolve('server', 'config', 'database.json'),
'migrations-path': path.resolve('server', 'migrations'),
'models-path': path.resolve('server', 'models'),
'seeders-path': path.resolve('server', 'seeders'),
}
import React, { Component } from 'react'
import Firebase from 'firebase'
import { FIREBASE_URL } from '../../lib/consts'
import denormalize from './lib/denormalize'
export var FirebaseConnect = (ComposedComponent, collections) => class extends Component {
constructor (props) {
super(props)
this.state = {
rootRef: new Firebase(FIREBASE_URL),
@giacomorebonato
giacomorebonato / webpack.config.js
Last active May 25, 2016 12:58
Really basic Webpack configuration
var webpack = require('webpack')
var path = require('path')
var NODE_ENV = process.env.NODE_ENV || 'development'
var conf = {
entry: {
'front-end': [path.join(__dirname, '/client/front/front-end.js')],
'back-end': [path.join(__dirname, '/client/back/back-end.js')]
},
output: {