- Make sure you have a terminal application on your computer. On Mac, the default "terminal" application will work. On Windows, use the command prompt, or another terminal program. If using the VS Code editor, a terminal is built in.
- Windows Users: If you get an error when running
npm deploy
in the command prompt, try installing an alternative terminal application. One of the following should work:- Cmder: http://cmder.net (use the "git for windows" version)
- MSGIT: https://gitforwindows.org
- Windows Users: If you get an error when running
- Try running
git --version
in your terminal. If you get an error, install git from here: https://git-scm.com/downloads - Install Node.js which includes
npm
. To test if you have this installed, runnpm -v
and if it is installed, you should see a number output with the current version. Make sure it is greater than5.2
. - If
npm
is not installed, go here to install Node.js: https://nodejs.org/en/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
branch=$(git symbolic-ref --short HEAD) | |
remote=$(git config --get remote.origin.url) | |
url=${remote/git\@github\.com\:/https://github.com/} | |
url=${url/\.git/\/compare/} | |
base= | |
while getopts b: opt; do | |
case $opt in | |
b) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "project", | |
"version": "0.0.0", | |
"authors": [ | |
"Eric Barnes <[email protected]>" | |
], | |
"license": "MIT", | |
"private": true, | |
"ignore": [ | |
"**/.*", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"atomic_save": true, | |
"default_line_ending": "unix", | |
"draw_white_space": "all", | |
"ensure_newline_at_eof_on_save": true, | |
"fallback_encoding": "UTF-8", | |
"highlight_line": true, | |
"shift_tab_unindent": true, | |
"tab_size": 2, | |
"translate_tabs_to_spaces": true, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if (!empty($_POST)) { | |
if (empty($_POST['name'])) { | |
$_POST['name'] = 'anonymous'; | |
} | |
if (empty($_POST['greeted'])) { | |
$_POST['greeted'] = 'none'; | |
} | |
if (empty($_POST['comments'])) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jQuery(document).ready(function ($) { | |
$.getJSON("http://kraigh.com/cse104/reviews.php", function(data) { | |
$.each(data, function(index, val) { | |
console.log(val); | |
var starsHtml = ''; | |
for (var i = 0; i < 5; i++) { | |
// subtract 1 from rating since i starts at 0 | |
if (i > (parseInt(val.rating, 10) - 1)) { | |
starsHtml += '<span class="glyphicon glyphicon-star-empty" aria-hidden="true"></span>'; | |
} else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html class="no-js" lang=""> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title></title> | |
<meta name="description" content=""> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>My Bootstrap Page</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous"> | |
<link rel="stylesheet" href="style.css" type="text/css"> | |
</head> | |
<body> | |
<nav class="navbar navbar-default navbar-fixed-top"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This would go inside the fuction that gets called after your list (GET) AJAX completes and you have an array of ToDos | |
for (let index = 0; index < todos.length; index++) { | |
// Create todo container | |
var todo = document.createElement("article"); | |
todo.setAttribute("id", todos[index].id); | |
todo.setAttribute("class", "todo"); | |
if (todos[index].completed) { | |
todo.classList += " completed"; | |
} | |
- Make sure you've followed the instructions here and have a working React app that is published to Github Pages.
- If you're using Bootstrap, jQuery, or another framework that you're loading via a CDN, copy your
<link>
or<script>
tags that load the frameworks intopublic/index.html
.- CSS you will want to load above the existing
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
line. - jQuery, etc you will want to place right before the closing
</body>
tag. - Note: you DO NOT need to load any of your custom CSS files here, React will do that for us. Only add frameworks or tools that you're loading via CDN, like Bootstrap or Font Awesome.
- CSS you will want to load above the existing
- Copy all of your CSS into
src/App.css
.