Skip to content

Instantly share code, notes, and snippets.

@tomatohammado
Created November 20, 2017 13:58
Show Gist options
  • Select an option

  • Save tomatohammado/74870fa5d4ea8b2ee086ec26c5eecd3f to your computer and use it in GitHub Desktop.

Select an option

Save tomatohammado/74870fa5d4ea8b2ee086ec26c5eecd3f to your computer and use it in GitHub Desktop.
Vestibule Week 1, homework over the weekend, memory card game
GAs-MacBook-Air:~ ga$ cd ga-wdi/
GAs-MacBook-Air:ga-wdi ga$ cd sandbox/
GAs-MacBook-Air:sandbox ga$ cd
GAs-MacBook-Air:~ ga$ cd ga-wdi/sandbox/
GAs-MacBook-Air:sandbox ga$ ls
css-test vestibule_day1_test
html-intro-test week1_day3_layout_exercise
GAs-MacBook-Air:sandbox ga$ mkdir conditionals_exercise
GAs-MacBook-Air:sandbox ga$ cd conditionals_exercise/
GAs-MacBook-Air:conditionals_exercise ga$ touch index.html
GAs-MacBook-Air:conditionals_exercise ga$ touch script.js
GAs-MacBook-Air:conditionals_exercise ga$ code .
GAs-MacBook-Air:conditionals_exercise ga$ cd ..
GAs-MacBook-Air:sandbox ga$ cd ..
GAs-MacBook-Air:ga-wdi ga$ cd fundamentals/wdi-fundamentals-memorygame/
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ code .
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ mkdir js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ touch js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "added js/ directory and created blank js/main.js file"
[master 238a452] added js/ directory and created blank js/main.js file
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git push
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (8/8), 826 bytes | 826.00 KiB/s, done.
Total 8 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), completed with 2 local objects.
To https://github.com/tomatohammado/wdi-fundamentals-memorygame.git
4b4a7fe..238a452 master -> master
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add index.html
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "moved `<script> for the js to the bottom, right before the `</body>`"
>
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "moved `<script> for the js to the bottom, right before the `</body>`"
>
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: index.html
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: css/style.css
modified: js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "moved the `<script>` for the js to the bottom, right before the `</body>`"
-bash: command substitution: line 1: syntax error near unexpected token `newline'
-bash: command substitution: line 1: `<script>'
-bash: command substitution: line 1: syntax error near unexpected token `newline'
-bash: command substitution: line 1: `</body>'
[master 155294e] moved the for the js to the bottom, right before the
1 file changed, 1 insertion(+)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git checkout -- css/style.css
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "added test console.log message, it works."
[master 6eba7e6] added test console.log message, it works.
1 file changed, 2 insertions(+)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git push
Counting objects: 7, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (7/7), 691 bytes | 345.00 KiB/s, done.
Total 7 (delta 3), reused 0 (delta 0)
remote: Resolving deltas: 100% (3/3), completed with 2 local objects.
To https://github.com/tomatohammado/wdi-fundamentals-memorygame.git
238a452..6eba7e6 master -> master
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: js/main.js
no changes added to commit (use "git add" and/or "git commit -a")
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "completed exercise for Unit 8. Used arrays and loops to compare different cards in play and alert if they match or not."
[master 998c22b] completed exercise for Unit 8. Used arrays and loops to compare different cards in play and alert if they match or not.
1 file changed, 23 insertions(+)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 596 bytes | 596.00 KiB/s, done.
Total 4 (delta 1), reused 0 (delta 0)
remote: Resolving deltas: 100% (1/1), completed with 1 local object.
To https://github.com/tomatohammado/wdi-fundamentals-memorygame.git
6eba7e6..998c22b master -> master
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git status
On branch master
Your branch is up to date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: js/main.js
no changes added to commit (use "git add" and/or "git commit -a")
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "added empty functino named flipCard. I followed the syntax from Unit 9, but I'm pretty sure there are other ways to define functions. I'll research later."
[master 4ac956a] added empty functino named flipCard. I followed the syntax from Unit 9, but I'm pretty sure there are other ways to define functions. I'll research later.
1 file changed, 4 insertions(+)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 467 bytes | 467.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/tomatohammado/wdi-fundamentals-memorygame.git
998c22b..4ac956a master -> master
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "moved most of the code to the new function flipCard, also didn't realize I had redundant code from an earlier exercise so I got rid of that too."
[master 3fa378a] moved most of the code to the new function flipCard, also didn't realize I had redundant code from an earlier exercise so I got rid of that too.
1 file changed, 23 insertions(+), 29 deletions(-)
rewrite js/main.js (73%)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "refactoring code, prints the card that is flipped and adds it to the cardsInPlay array. I call the function two times to test it out, looks good so far."
[master d839a79] refactoring code, prints the card that is flipped and adds it to the cardsInPlay array. I call the function two times to test it out, looks good so far.
1 file changed, 7 insertions(+), 8 deletions(-)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git push
Counting objects: 8, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (6/6), done.
Writing objects: 100% (8/8), 958 bytes | 958.00 KiB/s, done.
Total 8 (delta 4), reused 0 (delta 0)
remote: Resolving deltas: 100% (4/4), completed with 2 local objects.
To https://github.com/tomatohammado/wdi-fundamentals-memorygame.git
4ac956a..d839a79 master -> master
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "created checkForMatch function and call it, but it runs for each time the flipCard function is called, even when there aren't two cards to compare in cardsInPlay. This means that the first time it runs, when there is only one card, the conditional statement in checkForMatch is false so it prints that there isn't a match. So that's not right."
[master 4d5e698] created checkForMatch function and call it, but it runs for each time the flipCard function is called, even when there aren't two cards to compare in cardsInPlay. This means that the first time it runs, when there is only one card, the conditional statement in checkForMatch is false so it prints that there isn't a match. So that's not right.
1 file changed, 9 insertions(+), 7 deletions(-)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 638 bytes | 638.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/tomatohammado/wdi-fundamentals-memorygame.git
d839a79..4d5e698 master -> master
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git add js/main.js
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git commit -m "added another conditional statement to the checkForMatch function to check if there are two cards in the cardsInPlay array before determining that the two cards do not match. If there are not exacty two cards, then it prints that you need two cards to compare."
[master 18b54c9] added another conditional statement to the checkForMatch function to check if there are two cards in the cardsInPlay array before determining that the two cards do not match. If there are not exacty two cards, then it prints that you need two cards to compare.
1 file changed, 2 insertions(+)
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$ git push
Counting objects: 4, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (4/4), 524 bytes | 262.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/tomatohammado/wdi-fundamentals-memorygame.git
4d5e698..18b54c9 master -> master
GAs-MacBook-Air:wdi-fundamentals-memorygame ga$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment