Skip to content

Instantly share code, notes, and snippets.

View erockdotdev's full-sized avatar

Eric Sanchez erockdotdev

View GitHub Profile
@erockdotdev
erockdotdev / ajaxlab1.md
Created April 28, 2017 14:52
LAB 1 Evaluate Same-origin Policy

Now some writing. Answer the following questions with one or two sentences in a separate markdown file.

  1. What is a templating language and why do we use it?

    A templating language lets you use javascript in the view file. You can use partials to make resuable parts of code for multiple pages and have access to json objects and can used that information to manipulete the DOM.

  2. How do express routes work? Routes take in client request and reply with a response with the data requested or error message

    What is the difference between app.use('/') and router.get('/')?

Youtube Karaoke

I want to make a web app that records the audio of someone singing to youtube videos. For that I'll need to use the Web Audio API to Create, Read, Update and Delete audio, and the Youtube API to make videos searchable and playable within the browser.

Hopefully I'll be able to have the meta data that comes up from the Youtube video stored along with the recording. That way when someone plays back their song the video will come back up with it.

MVP on this would be getting the Web Audio API working to just have an audio recorder.

queries.js

var promise = require('bluebird'); var options = { promiseLib: promise };

var pgp = require('pg-promise')(options)

var connectionString = 'postgres://localhost:5432/contacts_db'; var db = pgp(connectionString);

queries.js

var promise = require('bluebird'); var options = { promiseLib: promise };

var pgp = require('pg-promise')(options)

var connectionString = 'postgres://localhost:5432/contacts_db'; var db = pgp(connectionString);

queries.js

var promise = require('bluebird'); var options = { promiseLib: promise };

var pgp = require('pg-promise')(options)

var connectionString = 'postgres://localhost:5432/contacts_db'; var db = pgp(connectionString);

..also includes the 80's.
I want to make a web app that only post 80's and 90's movies from Netflix.
You can Create, Read, Update and Delete a playlist.
Visually I want the list of movies to scroll like a 90's tv guide page but that might just be on a media query.

//////////////////////////////////////////// ////// PART 1 ////////////////////////////// ////////////////////////////////////////////

// Add comments to the below code and explain // what is happening

function Vehicle(type) { this.type = type;

@erockdotdev
erockdotdev / hw-u03-w07-d01-js-reading.md
Created May 9, 2017 02:19
hw-u03-w07-d01-js-reading

In a seperate markdown file, answer the following questions in no more than a few sentences. Please cut and paste the questions into the file you create.

  1. What are some advantages to using Javascript's built in iterator methods over writing you're own for loops? Javascript's built in iterator methods revove the need for setting counters like in a for or while loop. They also keep our code DRY as they are easily resuable vs a for loops that written for differnte arrays and outputs. Also, filtering option are semantic so its easy for someone else lookign at the code to know what the result is supposed to be.
  2. What is the difference between map and forEach? The difference between map and forEach is that map actually chnages the data and post to a new array while for each does someting with that data like presenting it, or moving it but not transforming it.
  3. What data type will filter return? Filter will return an array.
@erockdotdev
erockdotdev / eric_sanchez_constructor.js
Created May 9, 2017 15:00
eric_sanchez_constructor
class Eric {
constructor(age, from, transportation){
this.age = age;
this.from = from;
this.transportation = transportation;
}
speak(){
console.log(`I love ${this.from}`)
}
opinions(){