Skip to content

Instantly share code, notes, and snippets.

View msell's full-sized avatar

Matt Sell msell

View GitHub Profile
@msell
msell / logstory.js
Created January 6, 2018 04:11
DNM story text
document.querySelectorAll('.art-story__text').forEach(p => console.log(p.innerText))
@msell
msell / entryIdSaga.1.test.js
Last active October 2, 2017 14:40
entryId Saga TDD
describe('getEntryId saga', () => {
describe('when entryId exists in the querystring', () => {
describe('when entryId exists in state', () => {
it('should select the entryId from the store')
it('should return the entryId')
})
describe('when entryId does NOT exist in state', () => {
it('should attempt to select the entryId from the store')
@msell
msell / getApiToken.test.js
Created September 30, 2017 16:09
getApiToken saga
describe('getApiToken saga', () => {
test('check if token exists in redux store')
describe('when token was found in redux store', () => {
it('should return the token from the store')
})
describe('when token does not exist in redux store', () => {
it('should retrieve the entryId')

Application Foundation

ARc - Open source boilerplate react implementation

  • Can support SSR
  • Makes use of 'experimental' webpack features that result in some slick convention over configuration code, but at the expense of testability.
  • Requries more expertise, not widely adopted across industry.

Create-React-App - Facebook supported zero configuration SPA application.

@msell
msell / NotficationActionTypes.js
Created July 12, 2017 16:40 — forked from jerairrest/NotficationActionTypes.js
React-toastr Redux Implementation
export const RECEIVE_MESSAGE = 'RECEIVE_MESSAGE';
@msell
msell / jwt-example.go
Created July 3, 2017 02:37
JsonWebTokens Example with generated key.
/* rewritten example of JsonWebToken example
* from https://gist.github.com/thealexcons/4ecc09d50e6b9b3ff4e2408e910beb22
* Keys are generated and packed to PEM-format at server start
* Plus some fixes and refactors
*
* My respect to thealexcons
*/
package main
import (
@msell
msell / design-agility.md
Last active June 2, 2017 03:56
Software design impacts business agility

How software design impacts business agility

Tightly Coupled Software Example

A small change in a product with unknown or hard dependencies can quickly ripple through the architecture. Dependencies matter because they indicate risk, also known as changes that need coordination. >

@msell
msell / user stories.md
Created April 11, 2017 15:26
Writing User Stories

What are some definitions of a user story

User stories are short, simple descriptions of a feature told from the perspective of the person who desires the new capability, usually a user or customer of the system. They typically follow a simple template:

As a , I want so that .

User stories are often written on index cards or sticky notes, stored in a shoe box, and arranged on walls or tables to facilitate planning and discussion. As such, they strongly shift the focus from writing about features to discussing them. In fact, these discussions are more important than whatever text is written.

— Mike Cohn

@msell
msell / next.md
Last active November 17, 2017 05:11
Next.js

next examples

getInitialProps is a new lifecycle hook introduced by NextJS that runs on the server and the client.

if you have some less important network requests or other things that you dont want to do on the server then put them in the componentDidMount hook and they will only run on the client.

@msell
msell / JS Cookbook.md
Last active May 20, 2020 00:47
Javascript Cookbook

Software Development Cookbook

I sometimes like to compare the tools a software developer prefers to the way a chef might have particular ingredients that he prefers to use when cooking a meal. Sure a chef may use a wide variety of ingredients depedning on what the meal calls for, but they have opinions and preferences towards certain ingredients over others. Software developers are not that different. They often prefer a set of tools and ingredients when building applications. Reusing the same tools and ingredients helps developers become more efficient in building applications.

For years I was a developer focused on .net development. However in recent times I've gravitated towards javascript. Once node was born and we could now use javascript on the server becoming a 'full stack' developer seemed much more palpable. Today we can write cross platform desktop applications using electron, native mobile applications with [react-native](https://facebook.github.io/react-nativ