Skip to content

Instantly share code, notes, and snippets.

View having-fun-coding's full-sized avatar

Jeffrey Collins having-fun-coding

View GitHub Profile
@having-fun-coding
having-fun-coding / MainController.js
Last active August 29, 2015 14:20
PizzaPlanetApp - Index.html
app.controller('MainController', ['$scope', function($scope) {
$scope.today = new Date();
$scope.appetizers = [
{
name: 'Caprese',
description: 'Mozzarella, tomatoes, basil, balsmaic glaze.',
price: 4.95
},
@having-fun-coding
having-fun-coding / MainController.js
Last active August 29, 2015 14:20
BoltNetwork1 | Codecademy
app.controller('MainController', ['$scope', function($scope) {
$scope.program ={
series: "Sherlock",
series_img: "img/sherlock.jpg",
genre: "Crime drama",
season: 3,
episode: "The Empty Hearse",
description: "Two years after his reported Reichenbach Fall demise, Sherlock, who has been cleared of all fraud charges against him, returns with Mycroft's help to a London under threat of terrorist attack. John has moved on and has a girlfriend, Mary Morstan. Sherlock enlists Molly to assist him, but when John is kidnapped by unknown assailants and is rescued by Sherlock and Mary, John returns to help find the terrorists and an underground plot to blow up the Houses of Parliament during an all night sitting on Guy Fawkes Night.",
datetime: new Date(2014, 11, 31, 21, 00, 00, 00)
}
@having-fun-coding
having-fun-coding / MainConstroller.js
Created May 1, 2015 00:29
ServicesII | Forecast | Codecademy
app.controller('MainController', ['$scope', 'forecast', function($scope, forecast) {
forecast.success(function(data) {
$scope.fiveDay = data;
});
}]);
@having-fun-coding
having-fun-coding / HomeController.js
Created May 1, 2015 15:21
Outbox1 | Angularjs Service | codecademy
app.controller('HomeController', ['$scope', 'emails', function($scope, emails) {
emails.success(function(data) {
$scope.emails = data;
});
}]);
@having-fun-coding
having-fun-coding / HomeController.js
Created May 3, 2015 16:08
Codecademy RoutingIII
app.controller('HomeController', ['$scope', 'photos', function($scope, photos) {
photos.success(function(data) {
$scope.photos = data;
});
}]);
@having-fun-coding
having-fun-coding / MainController.js
Created May 4, 2015 15:07
NearMe 1 | Codecademy | Angularjs
app.controller('MainController', function() {
}):
function reverseString(str) {
return str.split("").reverse().join("");
}
reverseString('hello');
@having-fun-coding
having-fun-coding / factorialize.js
Created May 7, 2015 16:03
Factorialize A Number | Free Code Camp
function factorialize(num) {
if(num === 0 || num === 1){
fact = 1;
}
else{
fact = num * factorialize(num-1);
}
return fact;
}
@having-fun-coding
having-fun-coding / palindrome.js
Last active August 29, 2015 14:20
Palindrome at FCC
function palindrome (str) {
var string = (str+'').replace(/[\.,-\/#!$%\^&\*;:{}=\-_`~\ ()]/g,"").replace(/\s/g, "").toLowerCase();
return string === (string.split('').reverse().join(''));
}
@having-fun-coding
having-fun-coding / longestWord.js
Created May 8, 2015 19:37
findLongestWord | Free Code Camp | Bonfire Challenge
function findLongestWord(str) {
longWords = str.split(' ');
var longest = longWords[0].length;
for (var i = 0; i < longWords.length; i++) {
if (longWords[i].length > longest) {
longest = longWords[i].length;
}
}