Skip to content

Instantly share code, notes, and snippets.

View DanielHeckrath's full-sized avatar

Daniel Heckrath DanielHeckrath

View GitHub Profile
@DanielHeckrath
DanielHeckrath / index.js
Created September 28, 2017 18:18
Test gist for debug
process.env.DEBUG = "*";
const debugPackage = require("debug");
const debuggers = [
debugPackage("debug"),
debugPackage("error"),
debugPackage("trace"),
debugPackage("warn"),
debugPackage("info")
];
# Will update the character count based on the used word
def updateHand(hand, word)
# this is where the magic happens
before = {'a': 1, 'b': 2, 'c': 3}
after1 = updateHand(before, 'abc')
after2 = updateHand(before, 'abc')
@DanielHeckrath
DanielHeckrath / app.js
Created July 15, 2015 15:15
React app with redux store. Uses custom provider/middleware to intercept actions that aren't meant for the reducers.
class App extends React.Component {
render() {
return (
<ChatProvider store={redux}>
{::this.renderChildren}
</ChatProvider>
);
}
/*
* Copyright (C) 2006 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software