Skip to content

Instantly share code, notes, and snippets.

View bobbravo2's full-sized avatar

Bob Gregor bobbravo2

View GitHub Profile
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=<device-width>, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Captain Planet: The Game</title>
<!-- Bootstrap File -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<!-- JQuery -->

Look at script_lines.character_id == characters.id AND script_lines.episode_id == episodes.id which gives us the title and original_air_date

Query multiple tables (episodes, characters) - Find when the character moe szyslak first appears.

Part 2

Refactor our SQL to use JOINS

 SELECT * FROM `script_lines`, `characters`, `episodes`
	WHERE `characters`.`name` = 'moe szyslak'
	AND `characters`.`id` = `script_lines`.`character_id`
// Load the NPM Package inquirer
var inquirer = require("inquirer");
// Create a "Prompt" with a series of questions.
inquirer.prompt([
// Here we create a basic text prompt.
{
type: "input",
message: "What is your name?",
// Dependencies
var express = require("express");
// Create express app instance.
var app = express();
// Routes
app.get("/:operation/:firstNum/:secondNum", function(req, res) {
// Parameters are received from the URL
  • Instructions:

    • Make a JavaScript file called bands.js that exports an object of music genres and bands like this:
    {
      punk: 'Green Day',
      rap: 'Run DMC',
      classic: 'Led Zeppelin'

}

@bobbravo2
bobbravo2 / bcs-rando-groups-3.js
Last active March 10, 2017 16:41
bcs scraper/groups of 3 randomizer
var csv = [];
//Parse the names out of BCS attendance page
$("#attendanceHistory tbody tr td:first-child").each(function(k, v) {
csv.push($(v).html())
});
var classSize = csv.length;
//Enter your group sizes here (Thanks @RGtalbot)
var groupSize = 3;
var group = [[], [], [], [], [], [], [], [], []];
for (var i = 0; i < (classSize/groupSize); i ++) {
app.get("/Veteran/:id", function(req, res) {
db.Employer.findOne({
where: {
id: req.params.id
}
}).then(function(dbEmployer){