This file contains 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
# config/environments/development | |
# ActionMailer Config | |
config.action_mailer.default_url_options = { :host => 'localhost:3000' } | |
config.action_mailer.delivery_method = :smtp | |
# change to true to allow email to be sent during development | |
config.action_mailer.perform_deliveries = false | |
config.action_mailer.raise_delivery_errors = true | |
config.action_mailer.default :charset => "utf-8" | |
#config.action_mailer.default_url_options = { :host => 'your.websitedomain.com' } | |
config.action_mailer.smtp_settings = { |
This file contains 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
# == Schema Information | |
# Schema version: 20130116180743 | |
# | |
# Table name: users | |
# | |
# id :integer not null, primary key | |
# name :string(255) | |
# email :string(255) | |
# created_at :datetime not null | |
# updated_at :datetime not null |
This file contains 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
// Bonfire: Meet Bonfire | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-meet-bonfire# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function meetBonfire(argument) { | |
// Good luck! | |
console.log("you can read this function's argument in the developer tools", argument); | |
return true; |
This file contains 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
// Bonfire: Reverse a String | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-reverse-a-string# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function reverseString(str) { | |
return str.split('').reverse().join(''); | |
} | |
reverseString("hello"); |
This file contains 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
// Bonfire: Factorialize a Number | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-factorialize-a-number# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function factorialize(num) { | |
var total = 1; | |
for(var i=1;i<=num;i++){ | |
total = total * i; | |
} |
This file contains 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
// Bonfire: Check for Palindromes | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-check-for-palindromes# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function palindrome(str) { | |
// Good luck! | |
var myStr = str.replace(/[^A-Za-z0-9]/g, '').toLowerCase(); | |
reverseStr = myStr.split('').reverse().join(''); | |
if(myStr === reverseStr){ |
This file contains 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
// Bonfire: Find the Longest Word in a String | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-find-the-longest-word-in-a-string# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function findLongestWord(str) { | |
var words = str.split(" "); | |
var longestWord = words[0]; | |
for(i=0;i<words.length;i++){ |
This file contains 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
// Bonfire: Title Case a Sentence | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-title-case-a-sentence# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function titleCase(str) { | |
words = str.split(" "); | |
for(var i=0;i<words.length;i++){ | |
words[i] = words[i].charAt(0).toUpperCase() + words[i].substr(1).toLowerCase(); | |
} |
This file contains 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
// Bonfire: Return Largest Numbers in Arrays | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-return-largest-numbers-in-arrays# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function largestOfFour(arr) { | |
// You can do this! | |
var largest = []; | |
for(var i=0;i<arr.length;i++){ | |
largest[i] = arr[i][0]; |
This file contains 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
// Bonfire: Confirm the Ending | |
// Author: @patrickcurl | |
// Challenge: http://www.freecodecamp.com/challenges/bonfire-confirm-the-ending# | |
// Learn to Code at Free Code Camp (www.freecodecamp.com) | |
function end(str, target) { | |
// "Never give up and good luck will find you." | |
// -- Falcor | |
if(str.substr(-target.length) === target){ | |
return true; |
OlderNewer