Skip to content

Instantly share code, notes, and snippets.


Ira Herman iscott

View GitHub Profile
iscott /
Created Jul 23, 2021
Cheatsheet: Intro to React Native

Intro to react-native cheatsheet

By Ira Herman

Notes to help you get started in react-native.

Cheatsheet Objectives

  • Explain how react-native apps work, native UI with JS for logic.
  • Explain what Expo does.
iscott /
Last active Jul 20, 2021
Intro to Datastructures and Algorithms Cheat Sheet
iscott /
Last active Jul 17, 2021
Cheat Sheet: Simple Authentication in Rails 5 with has_secure_password

Cheat Sheet: Simple Authentication in Rails 6 with has_secure_password

The goal of this cheatsheet is to make it easy to add hand-rolled authentication to any rails app in a series of layers.

First the simplest/core layers, then optional layers depending on which features/functionality you want.

AUTHOR Ira Herman
LANGUAGE/STACK Ruby on Rails Version 4, 5, or 6
iscott /
Last active Jun 23, 2021
How to get rails to work on an M1 Mac


Experimenting with this instead:

  • rbenv versions
  • rbenv uninstall x.y.z # uninstall all versions from the last step
  • brew uninstall rbenv
  • uninstalling homebrew
  • removing
  • reinstall homebrew - not in rosetta 2

RESTful Routes to CRUD Mapping

Example resource: fruits

In I.N.D.U.C.E.S. route order:

URL HTTP Verb Action Notes
/fruits/ GET index INDEX when a user types localhost:3000/fruits in browser this route shows a list or index of all fruits
/fruits/new GET new NEW when a user types localhost:3000/fruits/new in browser this route shows the user a form to create a NEW fruit
iscott /
Created Mar 24, 2020
useState hook in React

Hooks: useState

Learning Objectives:

  • Explain what hooks do and how they let us use function components instead of class components.
  • Work with tuples.
  • Practice converting stateful class components to functional components with the useState hook.

🔗Codesandbox Demo

iscott /
Last active Apr 24, 2021
How ES6+ Destructuring Works

How destructuring works:

Given the JS Object:

const user = { name: "Ira", email: "", favColor: "blue" };

making variables WITHOUT using destructuring:

iscott /
Last active Apr 17, 2021
Git branches and merging

Basic workflow for git branching:

Create a branch called "my_feature_branch" and change your git to working on that branch:

git checkout -b my_feature_branch

The branch is an exact clone of what master was when you ran the command.

iscott /
Last active Apr 5, 2021
4 Different Ways To Write An Arrow Function With JSX

4 different ways to write an arrow function with JSX

const SettingsPage = (props) => {
    return (
            <Link to="/">Home</Link>

Run Server:

python3 runserver

Create DB:


Make migrations:

python3 makemigrations

Migrate DB: