Skip to content

Instantly share code, notes, and snippets.


Ira Herman iscott

View GitHub Profile
View gist:e88616c9c0f1422e1ae3
import UIKit
class ViewController: UIViewController {
@IBOutlet var webView: UIWebView!
@IBAction func goBack(sender: AnyObject) {
iscott / item_spec.rb
Created Mar 2, 2015
Testing scopes with RSPEC
View item_spec.rb
require 'rails_helper'
RSpec.describe Item, :type => :model do
before(:each) do
@purchased_item = Item.create(
:name => "Item1",
:qty => 1,
:is_purchased => true
View RPS Requirements
#RPS Lab Requirements
* Web Page/Web App that lets you play Rock Paper Scissors
* 2 Players (on the same screen)
* Win Logic (Tells the user who won)
* Custom styling (Fonts, Background, Images)
* Pictures for Rock, Paper, and Scissors
##Super Optional Bonus Challenge
* Play vs Computer (AI)
iscott / Javascript functions and conditionals using (){}, and
Last active Jun 7, 2017
Javascript functions and conditionals using (){}, and semicolons cheatsheet
View Javascript functions and conditionals using (){}, and

Javascript functions and conditionals using (){}, and semicolons


Curly braces {} almost always indicate a block of code. { means START } means END

Keywords like

iscott /
Created May 17, 2018
My Recommended Atom Packages and Theme to make Atom a Fully-Featured Editor

Atom Packages & Notes

This document will recommend some of my favorite packages (plugins, add-ons, whatever you want to call them...they're awesome) for the Atom text editor. These give atom many of the features of a full IDE (Integrated Development Environment).

Atom Website

To browse & install packages, (in the menu bar) go to Atom >> Preferences >> Install and search for your desired package. Click install. That's it!

There are links to the package documentation from the Atom site. You can also view instructions on how to use each package from the packages menu Atom >> Preferences >> Packages

iscott /
Last active Sep 11, 2018
MEANbean Full MEAN stack CRUD app cheatsheet

Cheat Sheet: MEANbean coffee shop

A cheatsheet by Ira Herman

AUTHOR Ira Herman
OUTCOME A full stack MEAN application with CRUD actions

Run Server:

python3 runserver

Create DB:

createdb <dbname>

Make migrations:

python3 makemigrations

Migrate DB:

iscott /
Created Mar 24, 2020
Intro to React Hooks

React Hooks

Intro to Hooks

Hooks were introduced in React Version 16.8.

Before hooks, all state needed to be within a Class component. Class components come with a lot of boilerplate, which can feel bulky, especially when dealing with a simpler state. Function components, on the other hand, are generally simpler and easier to read - but, until recently, could not manage their own state: they would receive some props, and return some JSX based on those props.

Hooks introduce state management to Function components, using a simpler and more flexible API. Here's an example of a Class component refactored to be a Function component with hooks:


Git Workflow CheatSheet

By Ira Herman

Use this workflow when working with teams to take advantage of Pull Requests and keep the master branch clean.

Creating and using your own branch locally:

iscott /
Created Apr 2, 2020
Classroom culture, intentions, and how to succeed

Classroom Culture

How to succeed in class:

  • Take initiative.
  • Ask for help.
  • Practice, practice, practice.

Let's all agree to:

  • Treat each other with respect
  • Avoid bringing distractions into class