Skip to content

Instantly share code, notes, and snippets.

View Schmerb's full-sized avatar

Michael Schmerbeck Schmerb

View GitHub Profile
@Schmerb
Schmerb / request-response-drills
Last active July 9, 2017 18:25
Request and response drills, server side fundamentals
Echo endpoint
https://glitch.com/edit/#!/shiny-plate?path=server.js:12:0
mad lib
https://glitch.com/edit/#!/wonderful-apology?path=server.js:22:0
A/B test
https://glitch.com/edit/#!/watery-denim?path=server.js:25:3
@Schmerb
Schmerb / Stream-It-Feedback
Created July 8, 2017 21:52
User feedback for Stream It, Front-End Capstone project.
After getting some feedback from a group of users, I gathered a few suggestions I was able to implement and update my web app accordingly. I removed any focus on input fields via hover, to adheer to web standards. I made sure all text is legible by giving contrast between text color and background color. Also, for cleaner markup, I used psuedo elements to accomplish my 'burger' menu and animations rather than using a series of elements to create the icon, its all handled with a single <div> and CSS alone. Cleaned up some of the order of elements such as movie / tv show plot so the text does not get too narrow which is a burden to read compared to a wider paragraph.
@Schmerb
Schmerb / stream.it
Last active June 23, 2017 23:15
API hack Capstone project.
Stream It will allow users to search for a movie or tv show and find which web platforms they can currently stream the movie/show on providing the links to the video as well as viewing options such as buy and rent and their corresponding prices.
I will be using Guidebox's API for video data and possibly GoWatchIt API as a fallback for when GuideBox terminates all free accounts.
Also, I will use The Open Movie Database (OMDBDatabase API) which gives me access to metadata from The International Movie Database (IMDB)
@Schmerb
Schmerb / event-listeners-drills
Created May 27, 2017 23:06
Unit 4 - Lesson 1 - event listeners
cat carousel
https://repl.it/GiQR/192
fizzbuzz with DOM insert
https://repl.it/GiQ8/325
Lightbulb toggle
https://repl.it/GiQm/124
function getTokens(rawString) {
// NB: `.filter(Boolean)` removes any falsy items from an array
return rawString.toLowerCase().split(/[ ,!.";:-]+/).filter(Boolean).sort(); // returns an array of words in the string using all multiples of white space and punctuation as the delimeter, removing any falsy values from array and finally sorting the array members alphabetically
}
function mostFrequentWord(text) {
var words = getTokens(text); // parses string into array, filtering out any white space or punctuation
var wordFrequencies = {}; // creates an object to store unique words and their frequencies
for (var i = 0; i <= words.length; i++) { // loops through all words in parsed string array
@Schmerb
Schmerb / obj-drills-2
Created May 25, 2017 15:21
Lesson 6 object drills 2
student report
https://repl.it/G9NG/106
enroll in school
https://repl.it/G9N6/81
find by id
https://repl.it/G9OF/57
validate object keys
@Schmerb
Schmerb / obj-drills-1
Created May 25, 2017 00:44
Lesson 6 obj drills 1
creator
https://repl.it/G9Lb/84
updater
https://repl.it/G9Lf/71
self-reference
https://repl.it/G9Lj/70
deleting keys
@Schmerb
Schmerb / js-in-my-words
Created May 24, 2017 23:11
Lesson 5 challenge, explaining in my own words
What is scope? (global / local)
Essentially, scope is about the different perspectives for different places in code, i.e. what variables and associated values other functions and variables can "see" or access. Global scope encompases the entirety of source code and even spans across files given the suffienct linking of such files. A variable defined in the global scope will be able to be accessed by anywhere else in the code, including inside functions and other files. Local scope refers to the perspective from inside a function, nested function, or bracketed area of code. Any variables declared inside of a function or nested function are not necessarily accessible in other functions. The scope chain comes into play here. Global scope is at the very top and local scopes exist below it. Variables can only be accessed in a desceding manner in regards to the chain. A variable declared inside a function locally, will not be able to be accessed from places outside of the function, or up the scope chain, but areas
@Schmerb
Schmerb / arrays-and-loops-drills
Created May 24, 2017 19:18
Lesson 4, arrays and loops drills
min/max
https://repl.it/G9KJ/112
average
https://repl.it/G9KO/85
Fizzbuzz
https://repl.it/G9KW/137
@Schmerb
Schmerb / array-basic-drills
Created May 23, 2017 23:59
Lesson 4 basic array drills
create array
https://repl.it/G9GB/79
adding item to array
https://repl.it/G9GI/69
accessing array items
https://repl.it/G9GO/68
length/access