Skip to content

Instantly share code, notes, and snippets.

View jeffkamo's full-sized avatar

Jeff Kamo jeffkamo

View GitHub Profile
// ...
// Near the bottom of the file, before the `module.exports`,
// paste in the following code:
const requestProcessor = Object.assign(
{},
{
entry: './app/request-processor.js',
target: 'node',
output: {
// In your project's /web/webpack directory
/* eslint-env node */
/* eslint-disable import/no-commonjs */
const path = require('path')
module.exports = {
entry: './app/request-processor.js',
target: 'node',
# Resources...
# CloudFrontDistribution...
# Properties...
# DistributionConfig...
# ...
DefaultCacheBehavior:
# ...
ForwardedValues:
Cookies:
Foreward: all
jest.mock('react-dom', () => ({
findDOMNode() {
return {
querySelectorAll: () => [],
contains: () => true
}
}
}))
@jeffkamo
jeffkamo / container.jsx
Last active July 29, 2017 00:03
Testing the Select component with a Redux Form
// bunch of imports...
/**
* Add these into the top of any container, and then add `<MyForm />`
* anywhere into the component to rendner the form.
*/
import Button from 'progressive-web-sdk/dist/components/button'
import Field from 'progressive-web-sdk/dist/components/field'
import FieldRow from 'progressive-web-sdk/dist/components/field-row'
import React, {PropTypes} from 'react';
import classnames from 'classnames';
import utilityClasses from './utilityClasses';
const Card = ({children, utilityClasses}) => { // how do we grab utility props, i.e. `boxShadow`, `paddingTop`, etc?
utilityClasses = {
...utilityClasses, // probably returns mostly false, except for some defaults?
'padding-all': 2,
}
@jeffkamo
jeffkamo / gist:0c7acf7450d1e7fcd224
Created December 4, 2015 05:02
Code Review PR Description Template
(brief description / PR title)
Status: **Ready for Code Review**
Owners: **(Github @<name>s of all relevant sub-contractor employees)**
Reviewers: **(GitHub @<name>s of all reviewers)**
JIRA: [JIRA-ticket](https://mobify.atlassian.net/browse/JIRA-ticket)
## Changes
- (change1)
{
"stats": [
{
"name": "speedindex",
"budget": 1000,
"points": [
{
"id": 1,
"datetime": "20111001",
"value": 1000,
@jeffkamo
jeffkamo / SassMeister-input.scss
Created January 22, 2015 02:02
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
.c-component {
$component__size: 16px;
font-size: $component__size;
}
@jeffkamo
jeffkamo / SassMeister-input.scss
Last active August 29, 2015 14:11
Generated by SassMeister.com.
// ----
// Sass (v3.4.9)
// Compass (v1.0.1)
// ----
@function foo($a: 1) {
@return $a;
}
.bar-1 {