Skip to content

Instantly share code, notes, and snippets.

View smably's full-sized avatar
😎
squashing bugs

Sylvan Mably smably

😎
squashing bugs
View GitHub Profile
@smably
smably / machine.js
Last active May 8, 2020 23:50
Generated by XState Viz: https://xstate.js.org/viz
const submenuStates = {
initial: "collapsed",
states: {
collapsed: {
on: {
"ITEM_WITH_SUBMENU.MOUSEOVER": "shouldExpand",
"ITEM_WITH_SUBMENU.CLICK": "expanded",
},
},
shouldExpand: {
@smably
smably / code-review.md
Last active February 10, 2022 14:14
How to Give a Great Code Review

How to Give a Great Code Review

Claim: A great code review is thorough, constructive, kind, and prompt.

Thorough

  1. Effective code review requires that you understand what the PR is trying to accomplish. If there is a ticket or issue associated with the PR, start by opening it and reading the acceptance criteria. Then read through the PR description. Think about how you might approach the problem if you had written the code yourself. What are the constraints? What are some edge cases you would want to watch out for? If you are unclear about any aspect of the problem the PR is solving, talk to the author to clarify before you start looking at their code.
  2. If the author has deployed their code to a QA environment, take some time to try out the new functionality. See whether the actual behaviour matches your assumptions. If not, go back and check the acceptance criteria. If you have any questions or you think you’ve found

Keybase proof

I hereby claim:

  • I am smably on github.
  • I am sylvanm (https://keybase.io/sylvanm) on keybase.
  • I have a public key ASCdt_1UK8nKwuUU8iMKR6X9WlhO26nYUlB_VpZKHhh64go

To claim this, I am signing this object:

@smably
smably / App.jsx
Last active April 12, 2017 18:27
react-portal bug on close
import React, { Component } from 'react';
import Portal from 'react-portal';
class PortalContents extends Component {
render () {
return <div onClick={this.props.closePortal}>close</div>;
}
componentDidMount() {
console.log('portal contents mounted');
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',