Skip to content

Instantly share code, notes, and snippets.

View ericmasiello's full-sized avatar
💃
Party.

Eric Masiello ericmasiello

💃
Party.
View GitHub Profile
import React, { Component } from 'react';
import ReactTestUtils from 'react-addons-test-utils';
import $ from 'jquery';
function jqueryAction(context) {
$(document).ready(()=> {
$('.theButton').on('click', ()=> {
$('.theTextarea').val('test value');
var node = context.refs.ta;
ReactTestUtils.Simulate.change(node);
@ericmasiello
ericmasiello / The Technical Interview Cheat Sheet.md
Last active July 18, 2017 01:04 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

Array

Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@ericmasiello
ericmasiello / Button.css
Last active March 6, 2020 20:10
Initial Button BEM BLOCK
.button {
border-radius: 0.25rem;
background-color: #676775;
color: #fff;
font-weight: 600;
font-size: 0.75rem;
text-transform: uppercase;
padding: 0.375rem 0.75rem;
}
import React from 'react';
import './Button.css';
function Button(props) {
const { children } = props;
return (<button className="button">{children}</button>);
}
export default Button;
@ericmasiello
ericmasiello / Button.css
Created March 6, 2020 15:39
Button with modifiers
.button {
border-radius: 0.25rem;
background-color: #676775;
color: #fff;
font-weight: 600;
font-size: 0.75rem;
text-transform: uppercase;
padding: 0.375rem 0.75rem;
}
@ericmasiello
ericmasiello / button-usage.html
Created March 6, 2020 15:41
BEM modifier usage
<!-- Good! -->
<button class="button button--outline">Click me</button>
<!-- Bad! -->
<button class="button--outline">Click me</button>
@ericmasiello
ericmasiello / button.css
Last active March 6, 2020 15:44
How to not do BEM modifiers
/* I don't recommend doing this! */
.button {
border-radius: 0.25rem;
background-color: #676775;
color: #fff;
font-weight: 600;
font-size: 0.75rem;
text-transform: uppercase;
padding: 0.375rem 0.75rem;
@ericmasiello
ericmasiello / button-usage.html
Created March 6, 2020 15:48
Non BEM modifier usage
<button class="button outline">Click me</button>
@ericmasiello
ericmasiello / some-specific-use-case.css
Created March 6, 2020 15:49
Specific CSS use case
/* some specific use case of my button with an ouline */
.flashy-button {
border-color: #ff02c9;
}
@ericmasiello
ericmasiello / some-specific-use-case.html
Created March 6, 2020 15:50
Specific use case html
<button class="button outline flashy-button">Flashy</button>