Skip to content

Instantly share code, notes, and snippets.

@JStans12
JStans12 / turing-prework.md
Last active August 9, 2016 22:29 — forked from mbburch/prework.md
An example template for your Turing pre-work Gist

Turing School Prework - Joey Stansfield

Task A- Practice Typing:

  • screenshots of scores will be posted in comments

Task B- Algorithmic Thinking & Logic:

  • screenshots of completed sections will be posted in comments

Task C- Create your Gist:

Module 1 Week 1 Diagnostic

This exercise is intended to help you assess your progress with the concepts and techniques we've covered during the week.

For these questions, write a short snippet of code that meets the requirement. Fill in your answers on a second sheet of paper or in your notebook. In cases where the question mentions a "given" data value, use the variable given to refer to it (instead of re-writing the information).

@JStans12
JStans12 / RetroPie.md
Last active May 1, 2019 20:24
RetroPie Tutorial

About

This is a simplifed tutorial for Turing Students wanting to get started in RetroPie with a Raspberry Pi 2 or 3. I'm making the assumption that you have a MacBook with an SD card reader.

What is RetroPie?

RetroPie is a combination of many emulation projects including EmulationStation and RetroArch. These projects are bundled into one system which is built on top of the Raspbian OS. EmulationStation essentially acts as the front end for a bunch of independently designed emulators.

What do I need?

@JStans12
JStans12 / gist:86963b733db3060ed276f35447615253
Last active January 6, 2017 03:17
Rails_The_Way_I_Like_it

Generate a new project without the included testing and with a postgres database:

rails new MyApp -T --database=postgresql

Add rspec, capybara, factory_girl, launchy and database cleaner to gemfile:

group :development, :test do
  gem 'rspec-rails'
  gem 'capybara'

Joey Stansfield - M2 Portfolio

Areas of Emphasis

  • Learn the tools required to actually build websites
  • Become comfortable with SQL and databases
  • Get better at CSS and HTML
  • Start hardware posse
  • Write some blog posts

cd to new directory and:

npm init

setup express:

npm install express --save

Form:

<div class="form-group">
  <%= label_tag :content, "Comment", class: "control-label col-md-4 required-field" %>
  <%= text_area_tag :content, "", id: "content", class: "input-md textinput textInput form-control" %>
  <input type="hidden" id="user_id" value=<%= "#{current_user.id}" %>>
  <input type="hidden" id="upload_id" value=<%= "#{@upload.id}" %>>
</div>
<div class="form-group">

install figaro:

gem 'figaro'

generate secret key:

rake secret
@JStans12
JStans12 / roles.md
Last active February 7, 2017 00:42

The lifecycle of user roles in Census

  • When an admin sends an invitation, they can select role from ["admin", "mentor", "student"].

  • If they select student, the new user will be given a role of either "enrolled", "active student" or "graduated" depending on the status of the cohort.

  • This makes 4 different roles that could be assigned to a new user.

  • There are 3 other roles which can be assigned later by an admin: ["exited", "removed", "graduated"]