Skip to content

Instantly share code, notes, and snippets.

View mikeyamadeo's full-sized avatar

Pixel mikeyamadeo

View GitHub Profile
@mikeyamadeo
mikeyamadeo / BYU201R_AngularA_intro.md
Last active January 5, 2016 00:08
Angular Learning Activity: Reusable Directives

We will build a contrived user registration that will take

  1. new user's name and

  2. a link to a picture they want to use for an avatar

The added users will then display below the form.

This will help us

@mikeyamadeo
mikeyamadeo / front_end_fundamental_knowledge.md
Last active October 5, 2015 13:10
Questions and exercises for one to demonstrate understanding of fundamental* front-end developer knowledge

javascript

Use the following code snippet to answer questions 1 - 2

var stringTransformerMaker (fn) {
  return function (string) {
    return fn(string)
  }
}

use deep-freeze in reducer tests to ensure no mutations

Photo/style.css

/* block */
.Photo {}

/* element */
.Photo__img {}

/* modifier */
.Photo--large {}
/* root */
.Photo {}
/* modifier */
.Photo--large {}
/* child */
.Photo__caption {}
/**
* CSS Modules Magic:
* styles = { Photo: '[hash]-Photo', ... }
*/
import styles from './style'
import React from 'react'
import cn from 'classnames'
const Photo = ({src, alt, isLarge}) =>
<div {...{ className: cn({
/* App/style/css/settings */
:root {
—-clr-watermelon: #4FC1E9;
—-spacing-default: 12px;
}
@custom-media —-viewport-narrow (width >= 31.25em);
/**
* Example using settings in 'Generic' layer
const pictionBlue = '#4FC1E9'
export const colors = {
primary: pictionBlue
}
export const spacing = {
tiny: ‘4px’
}
import { baseFontSize } from ‘./settings.js’
export const pxToEm = (px) =>
`${px / baseFontSize}em`