Skip to content

Instantly share code, notes, and snippets.

View rrgayhart's full-sized avatar

Romeeka Gayhart rrgayhart

View GitHub Profile
@rrgayhart
rrgayhart / gist:cf5dcefdf3975598f491
Last active June 26, 2022 06:09
Adding Sinon to WebPack

Adding Sinon to WebPack

  • Open your project (if you're using WebPack, obviously)

  • npm install sinon --save-dev

  • You should now have Sinon in your node modules and listed in your package.json file

  • In your tests, require Sinon: var sinon = require('sinon');

@rrgayhart
rrgayhart / react-notes.md
Last active December 16, 2015 17:26 — forked from biglovisa/react-notes.md
React in theory
@rrgayhart
rrgayhart / os-contributions.md
Last active December 21, 2015 00:25
Tips and Tricks for Contributing to Open Source Over Break

Picking A Project to Work On

  • Find a Repo that is primarily written in a language you're comfortable with.
    • Check out 24pullrequests.com
    • Talk to mentors that regularly contribute to open source for suggestions
    • Think about tools you already use like rspec or minitest.
    • Browse around Github
  • Avoid 'dead' repos - look at open PRs for the project - if a ton unmerged, project may be dead. Also look at stars for the repo and last commit date on master.
  • Look at the open issues for ones you can help with
  • Look at coverage reports and builds for areas that are untested
  • Fork the repo
@rrgayhart
rrgayhart / pr-template.md
Created January 7, 2016 15:05
Modified Quick Left PR Template

What's this PR do?

Where should the reviewer start?

How should this be manually tested?

Any background context you want to provide?

Screenshots (if appropriate)

What gif best describes this PR or how it makes you feel?

Module 4 Cheatsheet

Points

To graduate from Module 4 you will need to get ~80% of the total assigned points and pass your portfolio review. There will be ~1250 total points.

Everyone should have access to a google drive spreadsheet that lists where you're at in the pointwise.

If you don't have a link or the magic of google drive is on the fritz and your link isn't working, give us a shout.

Array Prototype Methods

I understand that functions in JavaScript can take any number of arguments.

I can describe the similarity between blocks in Ruby and anonymous functions in JavaScript.

Where are the methods available to all arrays (e.g. forEach, map, etc.) defined?

I can explain the difference between using a for loop and the forEach method.

I can explain the difference between function declarations and function expressions.

I can explain what the value of this is in a normal function.

I can explain what the value of this is when called from the context of an object.

I can explain how to explicitly set the value of this in a function.

I can explain the difference between call and apply.

I can explain how the new keyword changes the way a function behaves.

I can explain the implicit steps that happen in my function when I use the new keyword.

I can explain the difference between an object's prototype and the prototype property on the constructor function.

I understand how to place method on a prototype.

I understand the difference between using Object.create and using a

**Step One**: Watch [Sorting Algorithms in JavaScript](https://www.youtube.com/watch?v=uRyqlhjXYQI)
**Step Two**: Fork this gist.
**Step Three**: Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?"
**Step Four**: _Totally Optional_: take a look at some of the other forks and comment if the spirit moves you.
@rrgayhart
rrgayhart / require.markdown
Created February 7, 2016 17:23
The Concept of Require

When you start working with WebPack for GameTime, you'll notice that you can't just define a variable in one file and find it in another as easily as you can in Rails.

Read Node.js, Require and Exports and Organize Your Code with RequireJS

Fork this gist and answer the following questions:

  • In the context of Node, what is a module?
  • The code examples from the second blog post look very different from the first. Why?