Skip to content

Instantly share code, notes, and snippets.

View andywer's full-sized avatar

Andy Wermke andywer

View GitHub Profile
@andywer
andywer / postgres-outage.md
Created August 21, 2018 05:03
Post Mortem: Postgres outage on 2018-08-20

2018-08-20: Postgres failure

What happened

The PostgreSQL container stopped unexpectedly, was automatically restarted, but suddenly didn't accept any connections anymore. Neither from the API service containers nor from the Macbook over the internet.

Error in logs:

FATAL:  pg_hba.conf rejects connection for host "10.0.1.2", user "postgres", database "******", SSL off
@andywer
andywer / kubernetes-cheat.md
Last active August 8, 2018 09:59
Kubernetes Cheat Sheet
kubectl config get-contexts
cd charts/satoshipay
helm dep up
import State from 'new-state-component'
const setName = name => prevState => ({ ...prevState, name })
const RenameDialog = ({ prevName, onRename }) => {
return (
<State initial={{ name: prevName }}>
{(state, setState, memoize) => (
<RenameDialogUI
name={state.name}
@andywer
andywer / parcel-vs-webpack.md
Last active May 22, 2018 14:31
Parcel bundler vs Webpack

Tree shaking

Webpack: Should work now™

Parcel: Still not implemented - parcel-bundler/parcel#392

Environment vars substitution

Webpack: EnvironmentPlugin / DefinePlugin

@andywer
andywer / minikube-traefik.md
Created May 8, 2018 10:38
Running Traefik in Minikube using Helm

Traefik in Minikube using Helm

Install traefik to the cluster using helm.

helm install stable/traefik --set dashboard.enabled=true,imageTag=v1.6,serviceType=NodePort

Now edit the traefik dashboard service manually, since the traefik chart wants us to access the traefik dashboard via a custom domain. Since we run it locally in a VM, we will just expose the dashboard on the minikube IP on a custom port.

@andywer
andywer / migration-guide.md
Last active September 22, 2017 08:22
webpack-blocks 1.0 migration guide
@andywer
andywer / API-Ideas.md
Last active June 13, 2017 13:05
threads v1.0 - API ideas
const fetchData = thread(require('worker-loader!./fetch-data'))
// or
const fetchData = thread(async url => {
  return (await fetch(url)).json()
})

// fetchData :: ThenableObservable

const data = await fetchData('/api/me')
@andywer
andywer / talk-proposal.md
Last active December 23, 2020 17:22
Reactive Conf 2017 ⚡️ Talk Proposal - Memory Leak Hunt 2017 Style

This is a proposal for lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal!

Memory Leak Testing in 2017

Hi, I am Andy, creator of leakage - the node-powered memory leak testing library.

Instead of manual debugging it provides a structured approach to fix or even prevent memory leaks.

@andywer
andywer / counter.js
Last active July 15, 2017 11:41
React Stateful (!) Functional Components
// counter.js
import stateful from 'new-fancy-statefulness'
const Counter = (props, state, { setState }) => (
<div>
<div>Clicked {state.clicks} times</div>
<button onClick={props.onClick}>Increase +</button>
</div>
)
@andywer
andywer / package.json
Last active July 15, 2017 11:41
Leakage async: Real world test
{
"scripts": {
"test": "mocha"
},
"engines": {
"node": ">= 7.0"
},
"devDependencies": {
"leakage": "./path/to/local/leakage/branch/feature/async-support",
"mocha": "^3.2.0",