Skip to content

Instantly share code, notes, and snippets.

{"lastUpload":"2021-05-20T11:15:47.277Z","extensionVersion":"v3.4.3"}
@chemitaxis
chemitaxis / app.js
Last active March 8, 2021 03:02
Webpack config example with react router 4 and bundle loader
import React, { Component } from 'react'
import {
BrowserRouter as Router,
Route,
Link,
Switch
} from 'react-router-dom'
import { Provider, observer } from 'mobx-react'
import DevTools from 'mobx-react-devtools'
@chemitaxis
chemitaxis / circleci-2.0-eb-deployment.md
Created October 11, 2018 22:16 — forked from ryansimms/circleci-2.0-eb-deployment.md
Deploying to Elastic Beanstalk via CircleCi 2.0

Deploying to Elastic Beanstalk via CircleCi 2.0

I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.

For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.

Setup a user on AWS IAM to use for deployments

import {createFactory, arrayOf, onPatch, getSnapshot, applySnapshot, onSnapshot, applyPatches, IModelFactory, unionOf, primitiveFactory} from 'mobx-state-tree'
const Patch = createFactory({
op: '',
path: '',
value: ''
})
function createForm(Factory){
const F = createFactory({
@chemitaxis
chemitaxis / cloudSettings
Last active September 17, 2017 09:43
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-09-17T09:43:25.228Z","extensionVersion":"v2.8.3"}
@chemitaxis
chemitaxis / example.jsx
Last active August 5, 2017 00:55
Example mobx-state-tree and flow
// @flow
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import interact from 'interactjs';
import { observer, inject } from 'mobx-react';
type IItem = {
id: string,
posX: number,
posY: number,
@chemitaxis
chemitaxis / nginx.conf
Created July 10, 2017 11:54
Nginx configuration for caching items by time
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
@chemitaxis
chemitaxis / asyncomponent.js
Last active July 8, 2017 18:22
Async component React
import React, { Component } from 'react';
export default function asyncComponent(importComponent) {
class AsyncComponent extends Component {
constructor(props) {
super(props);
this.state = {
@chemitaxis
chemitaxis / nginx.conf
Created May 16, 2017 17:53
Enable two sites in nginx with express and node
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;