Skip to content

Instantly share code, notes, and snippets.


Christiano Milfont cmilfont

View GitHub Profile
cmilfont /
Created January 3, 2022 00:28 — forked from harperreed/
Notes Essays—Peter Thiel’s CS183: Startup—Stanford, Spring 2012

Peter Thiel's CS183: Startup - Class 1 Notes Essay

Here is an essay version of my class notes from Class 1 of CS183: Startup. Errors and omissions are my own. Credit for good stuff is Peter’s entirely.

CS183: Startup—Notes Essay—The Challenge of the Future

Purpose and Preamble

View tsconfig.json
"compilerOptions": {
"target": "ES2017",
"module": "CommonJS",
"moduleResolution": "node",
"outDir": "./build",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"sourceMap": true
cmilfont /
Created December 30, 2019 21:36 — forked from bradwestfall/
Use S3 and CloudFront to host Static Single Page Apps (SPAs) with HTTPs and www-redirects. Also covers deployments.

S3 Static Sites

What this will cover

  • Host a static website at S3
  • Redirect to
  • Website can be an SPA (requiring all requests to return index.html)
  • Free AWS SSL certs
  • Deployment with CDN invalidation


cmilfont / redux.js
Last active November 8, 2019 00:15
Usando Redux sem combineReducer
View redux.js
import { LOCATION_CHANGE } from 'connected-react-router';
import { connectRouter } from 'connected-react-router';
export default history => {
const handleRouter = connectRouter(history);
const initialState = {
router: connectRouter(history)
View saga.js
import { take, put, call } from 'redux-saga/effects';
import { eventChannel } from 'redux-saga';
import { push } from 'react-router-redux';
import actions from 'api/actions';
import reducer from 'api/reducers/crud';
import { loginMutation as mutation } from 'api/graphql/mutations';
function createSocketChannel(firebase) {
return eventChannel((emit) => {
return firebase.auth()
cmilfont /
Last active February 14, 2018 13:30
Modelos tradicionais de qualidade
cmilfont /
Last active November 27, 2017 19:51
Scripts para facilitar o workflow de release e corretamente gerar o changelog
#!/bin/sh -x
CURRENT=`git branch | grep "*" | awk '{print $2}'`
git commit -m "#${CURRENT}: $1"
# git add .
# commit "message"
View redux-error.js
// model error
import { Record, fromJS, Map } from 'immutable';
export default class ErrorRecord extends Record({
warnings: Map(),
form: Map(),
fatal: Map(),
}) {
constructor(values) {
// sua lógi a
View componentDidCatch.js
import React from 'react';
import { connect } from 'react-redux';
import { actions, mapDispatchToProps} from 'api/actions/errors';
class ErrorBoundary extends React.Component {
componentDidCatch(error, info) {
type: actions.GLOBAL_EXCEPTION,
payload: {