Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

James Newman jnewman12

🎯
Focusing
Block or report user

Report or block jnewman12

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@jnewman12
jnewman12 / active_storage.md
Last active Jun 16, 2019
WDI DTLA Active Storage Intro
View active_storage.md

File Uploads with Rails and Active Storage

rails + active-storage


Lesson Objectives

  • set up an account on Amazon Web Services to store uploaded images inside AWS S3
  • set up rails app to handle file uploads
  • understand the how and why, of a rails model with an image attribute
@jnewman12
jnewman12 / js_debugging.md
Created Jun 14, 2018
WDI DTLA JS Debugging
View js_debugging.md

Chrome Dev Tools

Objectives

After this lesson, students will be able to:

  • Open and describe the components of the Chrome developer tools
  • Use the developer tools to manipulate page elements (HTML/CSS)

Preparation

Before this lesson, students should already be able to:

@jnewman12
jnewman12 / carmen_san_diego.md
Created Jun 14, 2017
WDI SM Carmen San Diego
View carmen_san_diego.md

Use SQL to find Carmen Sandiego

Introduction

Where In The World Is Carmen Sandiego?

We're going to use what we've learned already about searching with SQL commands, and apply it to chase down and capture an elusive and world-reknowned thief, Carmen Sandiego. Follow the clues, use the interweb - write down both the SQL commands /queries you used and your answers to the clues - and figure out where Carmen's headed, so we can catch her and bring her in.

Exercise

@jnewman12
jnewman12 / active_record.md
Created Jun 14, 2017
WDI SM intro to active record
View active_record.md

ActiveRecord Methods and Finders

Objectives

  • Query a model using AR methods
  • Instantiate and create a new instance of a model
  • Edit a model's attributes
  • Destroy a model

Preparation

  • Write a model that inherits from ActiveRecord
View sql.md

Intro to SQL

Objectives

After this lesson, students will be able to:

  • Create a database table
  • Insert, retrieve, update, and delete a row or rows into a database table

Preparation

@jnewman12
jnewman12 / intro_sql.md
Created Jun 14, 2017
SM WDI intro to SQL
View intro_sql.md

Intro to Relational Data Modeling

Objectives

After this lesson, SWBAT:

  • Describe the relationship between tables, rows, and columns
  • Draw entity relationship diagrams (ERDs) with crow's foot notation for ideas for web apps
  • Describe how tables relate to each other using foreign keys
  • Explain the different relationship types – one to one, one to many, many to many
@jnewman12
jnewman12 / gh_pages.md
Last active Jun 8, 2017
Github pages intro
View gh_pages.md

Your project on github pages

  • first, make sure you have been pushing your project to github
  • if you're in a good spot for your project, commit and push to master

gh-pages branch

  • go into your project directory in your terminal
  • run git checkout -b gh-pages
  • then run git commit -am "gh-pages branch"
View note.md

What is a Callback?

A reference to executable code, or a piece of executable code, that is passed as an argument to other code.

All a callback is, is a function that takes a function as an argument.

Here is an example

function mySandwich(param1, param2, callback) {
    alert('Started eating my sandwich.\n\nIt has: ' + param1 + ', ' + param2);
@jnewman12
jnewman12 / bling.md
Last active May 31, 2017
WDI 47 SM Fellowship of the bling
View bling.md

Fellowship of the Bling ($)

Frodo ponders the power of the ring.

Using our new-found knowledge of jQuery, create a function for each of the following steps to practice DOM Manipulation, JavaScript, and jQuery.

Setup

@jnewman12
jnewman12 / practice.js
Last active Jun 13, 2018
WDI Week #1 JS Practice Problems
View practice.js
/*
1. Counting Sheep
Consider an array of sheep where some sheep may be missing from their place.
We need a function that counts the number of sheep present in the array (true means present).
*/
var arr = [true, true, true, false,
true, true, true, true ,
true, false, true, false,
true, false, false, true ,
true, true, true, true ,
You can’t perform that action at this time.