Skip to content

Instantly share code, notes, and snippets.

View NickFoden's full-sized avatar
🐯
I'm here live, i'm not a cat.

Nick Foden NickFoden

🐯
I'm here live, i'm not a cat.
View GitHub Profile
@NickFoden
NickFoden / node-001v5 project 1.1.6
Last active April 8, 2017 14:32
Glitch Submissions
https://glitch.com/edit/#!/grateful-consonant
https://glitch.com/edit/#!/cold-cannon
@NickFoden
NickFoden / Feedback.rtf
Created March 26, 2017 17:52
Salt And Pepper Feedback
Submitted to a few people.
I've changed it so it shows history of past results and
I think people want to see the latest result on it's own,
and then the following results can be much lower on the page.
Also have changed fonts and sizing, a bunch, but really feel
like this is stuck in the 90's. Going to look at other sites
as examples for ideas later today. People liked some basics,
adding border around images, moving ingredients list up a
@NickFoden
NickFoden / landing and results page
Created March 23, 2017 03:56
Salt And Pepper Wire Frames
Landing Page:
https://saltandpepper.mybalsamiq.com/projects/saltandpepper/Landing%20Page.jpeg?version=3&etag=DDhYKe8zX0qwERZMviUSc5t_JVVy32g2
Results Page:
https://saltandpepper.mybalsamiq.com/projects/saltandpepper/Results.jpeg?version=4&etag=0L1K4n3DEd9f85yRTC7kjNg0JirrQmF3
@NickFoden
NickFoden / Salt and Pepper
Last active March 21, 2017 00:03
Salt And Pepper Statement
Randomized recipe ideas for your dinner party, after you make some basic selections.
If you don't like the first result, spin the wheel again. Or maybe just spin the paired cocktail wheel.
@NickFoden
NickFoden / app.js
Created March 18, 2017 18:19
Challenge Tube
var YOUTUBE_BASE_URL = 'https://www.googleapis.com/youtube/v3/search /*add your api key*/
function getDataFromApi(searchTerm, callback) {
var settings = {
url: YOUTUBE_BASE_URL,
data: {
part: 'snippet',
q: searchTerm,
},
dataType: 'json',
@NickFoden
NickFoden / app.js
Created March 3, 2017 15:11
Text Analyzer
$(document).ready(function(){
$('.form').submit(function(event){
event.preventDefault();
var user_text = $('.form :input').val();
wordCount(user_text);
uniqueWordCount(user_text);
averageWordLength(user_text);
$('.text-report').removeClass('hidden');
https://courses.thinkful.com/fewd-001v6/project/2.6.6
First a function "getTokens" takes in a value rawString which is the text you are looking at.
It removes any special characters so that what is left of the string is just the words.
Then a new function takes that string and looks at each word through the string. As it goes word to word of the string it is looking for repeats. But how it does this is it makes a new array. And adds each word from the string to the array. If the word has already been added then the value goes up by one for each time it is added again. Each time a duplicate is added to the array, and already exists its count goes up.
Then next function looks for the word with the highest value, or count. If it comes across a word with a higher value then the one it just looked at then that new one becomes the max count. Or highest value. Leaving you at the end with the word that got the highest value, aka was repeated the most times.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</head>
<body>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">