Skip to content

Instantly share code, notes, and snippets.

View jasonpilz's full-sized avatar
💻

Jason Pilz jasonpilz

💻
View GitHub Profile

Setting Group Expectations

Group Member Names: Emily, Sekhar, Jason

  1. When are group members available to work together? What hours can each group member work individually? Are there any personal time commitments that need to be discussed?
  • Emily - not 4-6pm, avail 6-9pm, pref sat over sunday
  • Sekhar - anytime, FLEXIBLE!
  • Jason - weekdays flex to stay, pref sat over sunday
  1. How will group members communicate? How often will communication happen, and how will open lines of communication be maintained?

Now that we have ruby, node, and rails, it is time to get pg

    ssh root@your_ip_address_for_DO
    sudo apt-get update
    mkdir -p ~/.rbenv/plugins
    cd ~/.rbenv/plugins
    git clone https://github.com/sstephenson/rbenv-vars.git
    cd
    sudo apt-get install postgresql postgresql-contrib libpq-dev
@jasonpilz
jasonpilz / capybara cheat sheet
Created January 14, 2016 02:35 — forked from zhengjia/capybara cheat sheet
capybara cheat sheet
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')

- Mission

The purpose of this tutorial is to mimic setting up a DigitalOcean/AWS EC2/Linode server. The main advantages of having a virtual machine is that you can learn without worry of breaking things.

The first lesson will be all about getting familiar with a headless machine and getting a language we all know and love (ruby). Then we can mess around and try things out purely in the terminal.

The only three good options for a text editor are: emacs, vi, and vim. We will be using vim but vi itself is great and comes by default on Ubuntu 12.04.

Now you can practice getting used to ssh'ing into headless machines, using terminal based text editors, and using a terminal based window/session manager (tmux). The reason we have to use vim and tmux is that there is no X environment in a headless machine (the GUI, graphics, pretty things, etc..). The main reason for this is to save space on precious costly SSD data.

Array Prototype Methods

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

  • yes

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

  • yes

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

  • Array.prototype

JavaScript Functions

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.

Reference To: Sorting Algorithms in JavaScript

**Respond to this question in your fork: "What are some of the balances and trade offs between different sorting algoritms?"

###COMPARISON:

Bubble Sort Insertion Sort Merge Sort
Pros Easy to Implement
Stable sort
Good if short on space
Stable sort
Fastest
Cons
Not Stable sort
Slow as eff
Not good for large data Need lots of resources to use
O(n) O(n2) O(n2) O(n log n)
@jasonpilz
jasonpilz / require.markdown
Last active February 9, 2016 20:38 — forked from rrgayhart/require.markdown
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?
  • a module maps, or corresponds to, a file.

Step One: Watch Mary Rose Cook Live Codes Space Invaders from Front-Trends. (The second worst conference name ever?)

Step Two: Fork this gist.

Step Three: Respond to this question in your fork: What is one approach you can take from this Mary's code and implement in your project?

  • One approach I found interesting was to have the Game object delegate the Draw() and Update() methods to the objects themself ( Player, Invader, Bullet ) Also plan to use the Keyboarder structure to nicely package the functionality of detecting keyboard input.

Step Four: Totally Optional: take a look at some of the other forks and comment if the spirit moves you.

Step One: Watch Writing Testable JavaScript - Rebecca Murphey from Full Frontal 2012 (award for worst conference name ever?)

Step Three: Consider the four responsibilities that Rebecca lists for client side code (hint: they're color coded).

Did any of the responsibilities that she lists surprise you?

  • I was surprised by seeing the 'application state' category. This is not something I considered when thinking about components to test.

Do you feel like you mentally split your client side code in IdeaBox and other past projects into these responsibilities?

  • I would say I had clear intention of testing the 'data/server communication' category, as well as set up. I feel like the 'presentation & interaction' category would be how I would think of integration tests (I felt this video was referring only to unit tests). The 'application state' category I only considered rarley if ever.