Skip to content

Instantly share code, notes, and snippets.

View nufaylr's full-sized avatar
👋

Nufayl Razick nufaylr

👋
View GitHub Profile
@nufaylr
nufaylr / webpack.config.js
Created May 15, 2019 10:13 — forked from colbycheeze/webpack.config.js
Storybook config
const webpack = require('webpack')
const path = require('path')
const cssnano = require('cssnano')
const BASE_PATH = '..'
const resolvePath = subPath => path.resolve(__dirname, `${BASE_PATH}/${subPath}`)
const env = process.env.NODE_ENV || 'development'
/* eslint-disable */
@nufaylr
nufaylr / .bashrc
Created June 13, 2019 10:24
Show Git Branch
# Show Git Branch
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
export PS1="[\u@\h \W]\[\033[00;32m\]\$(git_branch)\[\033[00m\]\$ "
@nufaylr
nufaylr / 01-simple.test.js
Created November 26, 2019 08:41 — forked from a-h/01-simple.test.js
Testing styled Material UI components with Enzyme
import React from 'react';
import { shallow } from 'enzyme';
const Item = text => <p>Item {text}</p>;
const Composition = ({ showB }) => (
<p>
<Item text="A" />
{showB && <Item text="B" />}
</p>);
@nufaylr
nufaylr / icon.js
Created November 26, 2019 08:42 — forked from evansiroky/icon.js
Mocking children components with Jest - does this make sense?
import React from 'react'
export default class Icon extends React.Component {
render () {
const {type, className} = this.props
return (
<i
className={`fa fa-${type} fa-fw ${className}`}
{...this.props}