Skip to content

Instantly share code, notes, and snippets.

View seanwash's full-sized avatar
🏠
Working from home

Sean Washington seanwash

🏠
Working from home
View GitHub Profile
@seanwash
seanwash / job-search-notes.md
Created December 6, 2016 04:56
Sean's Job Search Notes

Job Search

Applied To:

  • Automattic - No
  • Mixmax - No, not enough experience
  • GitLab (Interviewed)
  • Rollbar (No Response)
  • Black Pixel (No Response)
  • Waldo Photos (No Response)
  • Strive HQ (No Response)
@seanwash
seanwash / question.md
Last active October 12, 2016 01:08
React/Redux/Router Flow

So, right now I have a landing page that fetches all of my data through an action.

When the user clicks to view a singular item from the landing page (items -> items/:id), should the page component dispatch an action called findItemByID, the reducer do the finding and set a {currentItem: id} object on the root store? You'd essentially have something like:

  items: { "items": [], "currentItem": 10, "fetching": false, "fetched": true, "errors": null }

How do you handle this flow in Redux? Am I doing it all wrong?

Terms

Actions

An action describes user intent. It's an object with a type (required) and any sort of date.

Ex:

{
@seanwash
seanwash / yaml-to-json-api.js
Last active October 5, 2016 22:34
Code Review - Build JSON API from Yaml files
'use strict'
// Use entr to auto re-run build - $ ls -d **/* | entr sh -c 'clear; node build.js'
const yaml = require('yaml-js')
const fs = require('fs')
const paths = {
guides: `${__dirname}/data/guides`,
articles: `${__dirname}/data/articles`,
@seanwash
seanwash / javascript-the-land-of-opportunity.md
Last active October 6, 2016 03:49
JavaScript – The Land of Opportunity
title date tags
JavaScript - The Land of Opportunity
2016-10-05 13:11:53 -0700

JavaScript Fatigue - Everyone's talking about it and most of us have felt it in one way or another. While it often feels good to blow off some steam by writing satirical articles about the current state of the JavaScript ecosystem, dwelling on it too much in that light can become frustrating and discouraging for both yourself and for others. Although I'm not the first, I'd like to try to talk about JavaScript Fatigue in a different light.

JavaScript is a land of opportunity

@seanwash
seanwash / node.sh
Created August 16, 2016 15:03 — forked from adamcbrewer/node.sh
NODE: Run a daemon node.js server and create virtualhost to forward all site traffic to the specified port.
# This command will make sure the process persists
# even after you log out of a session
node server.js >/dev/null 2>&1 &
› whois gethub.com
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Domain Name: GETHUB.COM
Registrar: INAMES CO., LTD.
@seanwash
seanwash / brunch-config.js
Created June 18, 2016 23:44
Brunch config file for projects using basscss + responsive utilities
module.exports = {
// See http://brunch.io for documentation.
files: {
javascripts: {joinTo: 'app.js'},
stylesheets: {
joinTo: 'app.css',
order: {
before: [
'node_modules/basscss/css/basscss.css',
'node_modules/basscss-responsive-padding/css/responsive-padding.css',
@seanwash
seanwash / structure.md
Last active May 7, 2016 22:06
Hapi.js Structure
  • package.json
  • server.js - Kicks off server
  • app/routes - Contains all app routes (exercises/index.js, exercises/show.js)
  • app/views - any server side views (exercise/index.jade, exercises/show.jade)
  • models - Contains sequelize models
  • seeders - model seeds
  • config - config vars & such
  • public - Static assets