Skip to content

Instantly share code, notes, and snippets.

View bceskavich's full-sized avatar

Billy Ceskavich bceskavich

View GitHub Profile
@bceskavich
bceskavich / current.json
Last active June 17, 2019 14:43
Frame.io public docs deploy issue with ReadMe.io
{
"components": {
"requestBodies": {
"AssetCreateRequest": {
"content": {
"application/json": {
"examples": {},
"schema": {
"properties": {
"description": {
@bceskavich
bceskavich / popularity_store.ex
Created May 21, 2019 20:14
Frame.io Elixir Study Group Exercise 4: GenServers
defmodule PopularityStoreServer do
@moduledoc """
Our emoji popularity store, implemented as a GenServer. A GenServer is a
generic approach for implementing a stateful process. In this store module, we
bundle both the client API for interacting with our GenServer and the internal
process callbacks used to respond to inbound messages.
"""
use GenServer
@bceskavich
bceskavich / renderRouteChildren.js
Last active October 6, 2015 03:23
A quick utility to pass React props down a react-router chain in react-router v.1.0.0+
import React from 'react';
import omit from 'lodash/object/omit';
export default function renderRouteChildren(props) {
const { children } = props;
return children && React.cloneElement(children, {...omit(props, 'children')});
}
// EXAMPLE
class App extends React.Component {
@bceskavich
bceskavich / index.html
Created October 6, 2015 03:01
src/templates/index.html
<!DOCTYPE html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>React Flux Boilerplate</title>
{% if (o.htmlWebpackPlugin.options.env !== 'development') { %}
@bceskavich
bceskavich / webpack.base.js
Created October 6, 2015 03:00
config/webpack.base.js
// config/webpack.base.js
var path = require(‘path’);
var config = require(‘config’);
var webpack = require(‘webpack’);
var HtmlWebpackPlugin = require(‘html-webpack-plugin’);
module.exports = {
cache: true,
output: {
@bceskavich
bceskavich / production.js
Created October 6, 2015 03:00
config/production.js
var path = require(‘path’);
module.exports = {
env: (process.env.NODE_ENV || ‘development’),
server: {
port: (process.env.PORT || 5000)
},
webpack: {
output: {
path: path.join(__dirname, ‘../build/assets’),
@bceskavich
bceskavich / default.js
Created October 6, 2015 02:59
config/default.js
var path = require('path');
module.exports = {
env: (process.env.NODE_ENV || 'development'),
webpackServer: {
port: (process.env.WEBPACK_PORT || 8888)
},
server: {
port: (process.env.PORT || 5000)
},
import config from 'config';
import express from 'express';
import proxy from 'proxy-middleware';
import request from 'request';
import url from 'url';
import webpack from 'webpack';
import WebpackDevServer from 'webpack-dev-server';
import WebpackDevConfig from './config/webpack.development';
const APP_PORT = config.get('server.port');
@bceskavich
bceskavich / webpack.production.js
Created October 6, 2015 02:34
config/webpack.production.js
var webpack = require('webpack');
var merge = require('webpack-config-merger');
var ExtractTextPlugin = require('extract-text-webpack-plugin');
var baseConfig = require('./webpack.base.js');
var config = require('config');
var patterns = require('css-patterns');
var path = require('path');
module.exports = merge(baseConfig, {
entry: {
@bceskavich
bceskavich / .eslintrc
Created October 6, 2015 02:32
.eslintrc
{
"parser": "babel-eslint",
"plugins": [
"react"
],
"env": {
"browser": true,
"node": true,
"es6": true
},