Skip to content

Instantly share code, notes, and snippets.

View craigmr's full-sized avatar

Craig Simpson craigmr

View GitHub Profile
@craigmr
craigmr / angular-talk.md
Created October 21, 2015 01:48
Better Angular Apps using Directives as Components

Since the creation of advance framworks like React, Angular, Polymer, and others web development is evoluting by focusing on component based development for large SAPs. These components allow developers to create modular, single focused pieces of functionality that are easy to maintain and adapt. Browser vendors recongize the power of components and are working on supporting native web components. While support is growing for native componets, directives in Angular give developers the power to create web components today. Directives are the most misunderstood and mysterious feature of Angular, but contains the some of most power and functionality. This talk will show how moving your functionality away from ng-controller and into directives will provide the flexibilty and modularity needed for modern SAPs.

Craig Simpson is the lead frontend developer for PureCars in Atlanta and has been developing frontends for 10 years. He is a fan of both React and Angular, advocate for UI/UX, and believes TDD and continous

@craigmr
craigmr / entitiesAccessor.js
Created March 29, 2016 18:22
factory function for EntitiesAccessor
const accessor = {
isEntityCached(schema, id) {
const key = schema.getKey();
const entities = this.entities.get(key);
return entities ? entities.has(id) : false;
},
getEntity(schema, id) {
const key = schema.getKey();
return this.entities.getIn([key, id]);
},
@craigmr
craigmr / Description.md
Created March 28, 2017 13:57
Connect Tech Proposal

The Bits and Bytes of JavaScript

Summary

The bitwise operators (&, |, ^, >>, <<, ~) and raw binary are some of the least understood and used features in JavaScript, however they are all around you. Inherited from C, bitwise operators give you the power to quickly encode and process complex datasets. CSS hex/rgba colors, unicode (UTF8), emjios, base64 files, streaming videos, 2d and 3d games, and setting file permissions are all examples the magic of bits, bytes, and bitwise operators. Using UT8 as an example we will cover the basics of binary and logical operations. From there we'll explore more advance usages for bitmasks, flags, protocol buffers, and learn about shared buffered arrays in future versions of JavaScript.