I hereby claim:
- I am gbakernet on github.
- I am gbakernet (https://keybase.io/gbakernet) on keybase.
- I have a public key whose fingerprint is 5DF0 2049 61AF 358C 1FC6 C3EE 97EF A4FD A717 CAE6
To claim this, I am signing this object:
| import { createStore } from "redux" | |
| // Simple Reducer for mock data | |
| export default () => { | |
| const reducer = (state = {}, action) => { | |
| switch (action.type) { | |
| case "DATA_LOADED": | |
| return { heading: `Hello World! ${Date.now()}` } | |
| default: | |
| return state |
I hereby claim:
To claim this, I am signing this object:
| // Preserve the server render markup | |
| // This has to run before the root render | |
| let preservedMarkup = {} | |
| if (typeof document !== "undefined") { | |
| [...document.querySelectorAll("[data-async-component]")].map(node => | |
| preservedMarkup[node.getAttribute("data-async-component")] = node.innerHTML | |
| ) | |
| } | |
| // getComponent is a function that returns a promise for a component |
| <?xml version="1.0"?> | |
| <!-- | |
| # Sass Macros for Ant | |
| # http://github.com/gbakernet | |
| # Authored 2012 Glenn Baker; Licensed MIT */ | |
| <sass> Usage - Compile sass files | |
| * jarpath - is path to jruby-complete.jar and gem-sass.jar | |
| * src - input | |
| * dest - output |
| /* Mad CSS */ |
| <!DOCTYPE html> | |
| <!-- | |
| This is a simple experiment relying on ECMAScript 6 Proxies. To try this out, | |
| use Aurora (http://www.mozilla.org/en-US/firefox/channel/). | |
| The goal was to create a HTML writer where the method names were really just | |
| the HTML tags names, but without manually creating each method. This uses | |
| a Proxy to create a shell to an underlying writer object that checks each | |
| method name to see if it's in a list of known tags. |
| "npm install socket-io" & you are ready to go |
| /* IIFE Helper */ | |
| function iife( dep, fn ) { fn.apply( fn, dep ); } | |
| /* Usage: Closure where the arguments read at the top of your code */ | |
| iife([ window, document, jQuery ], | |
| function( win, doc, $) { | |
| //Lengthy code goes here | |
| console.log( arguments ) | |
| }); |
| // 1: how could you rewrite the following to make it shorter? | |
| if (foo) { | |
| bar.doSomething(el); | |
| } else { | |
| bar.doSomethingElse(el); | |
| } | |