Skip to content

Instantly share code, notes, and snippets.

View ricokareem's full-sized avatar
:octocat:

Rico Rodriquez Collins ricokareem

:octocat:
View GitHub Profile
@ricokareem
ricokareem / gist:e05b6d5d6f27856336bde7378a6ce94f
Created April 29, 2021 15:57 — forked from clintel/gist:1155906
Fenced code in bullet lists with GitHub-flavoured MarkDown??

Fenced code blocks inside ordered and unordered lists

  1. This is a numbered list.

  2. I'm going to include a fenced code block as part of this bullet:

    Code
    More Code
    
@ricokareem
ricokareem / react-forwardref-simple-example.js
Created December 1, 2020 23:24 — forked from jamesreggio/react-forwardref-simple-example.js
Simple example usage of React.forwardRef()
// EmailInput wraps an HTML `input` and adds some app-specific styling.
const EmailInput = React.forwardRef((props, ref) => (
<input ref={ref} {...props} type="email" className="AppEmailInput" />
));
class App extends Component {
emailRef = React.createRef();
render() {
return (
@ricokareem
ricokareem / README.md
Created November 10, 2020 01:42 — forked from remarkablemark/README.md
How to mock `window.location.reload` in Jest and jsdom: https://remarkablemark.org/blog/2018/11/17/mock-window-location/

There are certain files created by particular editors, IDEs, operating systems, etc., that do not belong in a repository. But adding system-specific files to the repo's .gitignore is considered a poor practice. This file should only exclude files and directories that are a part of the package that should not be versioned (such as the node_modules directory) as well as files that are generated (and regenerated) as artifacts of a build process.

All other files should be in your own global gitignore file. Create a file called .gitignore in your home directory and add anything you want to ignore. You then need to tell git where your global gitignore file is.

Mac

git config --global core.excludesfile ~/.gitignore

Windows

git config --global core.excludesfile %USERPROFILE%\.gitignore
@ricokareem
ricokareem / Readme.md
Last active January 1, 2016 19:19 — forked from wookimiii/grco.bash

Make this file executable and add it to your path

Usage

grco [some-text]