Skip to content

Instantly share code, notes, and snippets.

View dangreenisrael's full-sized avatar
👨‍💻
Chasing toddlers and writing code

Dan Green-Leipciger dangreenisrael

👨‍💻
Chasing toddlers and writing code
View GitHub Profile
@billydh
billydh / docker-compose.yml
Last active February 24, 2022 10:05
Docker compose file with Confluent Kafka and Schema Registry
version: "3"
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.4.0
hostname: zookeeper
container_name: zookeeper
ports:
- "2181:2181"
environment:
@iuricmp
iuricmp / git-squash
Created June 16, 2017 13:27 — forked from tuxfight3r/git-squash
git squash multiple commits with rebase
git rebase --interactive HEAD~2
# we are going to squash c into b
pick b76d157 b
pick a931ac7 c
# squash c into b
pick b76d157 b
s a931ac7 c
@abhiaiyer91
abhiaiyer91 / reduxSelectorPattern.md
Last active April 29, 2022 06:00
Redux Selector Pattern

Redux Selector Pattern

Imagine we have a reducer to control a list of items:

function listOfItems(state: Array<Object> = [], action: Object = {}): Array<Object> {
  switch(action.type) {
    case 'SHOW_ALL_ITEMS':
      return action.data.items
    default:
@michaelrambeau
michaelrambeau / webpack-devserver.js
Created February 27, 2016 13:33
Script to launch webpack dev server (instead of using `webpack-dev-server --content-base www --hot` command).
// node.js server used to serve assets bundled by Webpack
// use `npm start` command to launch the server.
const webpack = require('webpack');
const WebpackDevServer = require('webpack-dev-server');
const config = require('../../config/webpack.local.config');
console.log('Starting the dev web server...');
const port = 8080;
const path = require('path');
const options = {