Skip to content

Instantly share code, notes, and snippets.

View stevekinney's full-sized avatar

Steve Kinney stevekinney

View GitHub Profile

SSR solves a lot of problems for our users, but can be tricky for our tests. Cypress waits until the window fires its load event, but when we're using SSR, our JavaScript might show up after our page officially loads.

For example, this test will fail:

describe.only('Ratings Filter with SSR', () => {
  beforeEach(() => {
    cy.visit('/secret-menu');
    cy.get('#minimum-rating-visibility').as('rating-filter');
 });

React && Firebase Workshop

Contact Information

Prequisite Setup

  • A recent version of Node.js
  • npm install -g create-react-app

The Basics

Okay, we're going to warm up by implementing a reducer in order to get everything up and running again.

We're going to implement the basic functionality.

const reducer = (state = [], action) => {
  return state;
};
const template = [
{
label: 'File',
submenu: [
{
label: 'Open',
accelerator: 'CmdOrCtrl+O',
click() { openFile(); }
},
{
@stevekinney
stevekinney / fahrenheit_to_celsius.js
Created July 25, 2012 13:02
Function Example: Convert Fahrenheit to Celsius
function convertFahrenheitToCelsius(temperature) {
// Take whatever temperature the function is handed, do some math and return it.
return (temperature - 32) * (5/9)
}
// Prompt the user and store whatever they say in a variable.
var theirInput = prompt("Enter in a Fahrenheit temperature & I'll convert it to Celsius");
// Run their number through the function and store it in a variable named result.
var result = convertFahrenheitToCelsius(theirInput);
// Records every DOM event and then set ups a listener that shows
// the full CSS selector path of the target that triggered the event.
const getPathForElement = el => {
const names = [];
while (el.parentNode) {
if (el.id) {
names.unshift(`#${el.id}`);
break;
} else {
{
"printWidth": 80,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"bracketSpacing": true,
"jsxBracketSameLine": false,
"fluid": false

Building a desktop application with Electron

This is a tutorial for building a Markdown-to-HTML renderer using Electron. It is meant to accompany my session on Building a desktop application with Electron at JSConf Colombia.

The slides for the first part of the presentation are available here.

About Steve

Steve is the Director of Academics for the Front-End Engineering program at the Turing School of Software and Design in Denver, Colorado, USA.

Detailed Rubric

Subjective evaluation will be made on your work/process according to the following criteria:

1. Satisfactory Progress

  • 4: Developer completes iterations 1 through 6 as well as an additional supporting feature
  • 3: Developer completes iterations 1 through 6 (this includes one supporting feature) with few bugs and no missing functionality.
  • 2: Developer completes iterations 1 through 5 with some bugs or missing functionality.
  • 1: Developer fails to complete iterations 1 through 4, or there are significant issues with delivered functionality.