This file contains hidden or 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
//add an event listener to the black marker | |
google.maps.event.addListener(marker,'click', function(){ | |
infowindow.open(map, marker); | |
}); |
This file contains hidden or 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
Invalid .gemspec format in '/var/lib/gems/1.8/specifications/therubyracer-0.9.7.gemspec' |
This file contains hidden or 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
sudo aptitude install build-essential bison openssl libreadline5 libreadline5-dev curl git zlib1g zlib1g-dev libssl-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev |
This file contains hidden or 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
group :production do | |
gem 'pg' | |
end | |
#used this in my gemfile, and used the cedar stack. | |
#also had to precompile the assets before you commit. | |
# $ bundle exec rake assets:precompile |
This file contains hidden or 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
$(document).ready(function(){ | |
function randomFromTo(from, to){ | |
return Math.floor(Math.random() * (to - from + 1) + from); | |
} | |
var randomnumber= randomFromTo(2,5); | |
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
This file contains hidden or 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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
@media print{ | |
@page {size: landscape} | |
#wrap_invoice{ |
This file contains hidden or 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
<div id="wrap_invoice"> | |
<table> | |
<tr> | |
<td width="400"><!--replace this text with variables-->John Smith</td> | |
<td><!--replace this text with variables-->$1.46</td> | |
</tr> | |
<tr> |
This file contains hidden or 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
#typical smtp_settings for gmail account | |
config.action_mailer.smtp_settings = { | |
:address => "smtp.gmail.com", | |
:port => 587, | |
:domain => "domain.of.sender.net", | |
:authentication => "plain" | |
:user_name => "spencecooley" | |
:password => "secret" | |
:enable_starttls_auto => true | |
} |
This file contains hidden or 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
class Notifier < ActionMailer::Base | |
default :from => "Sam Ruby <[email protected]>" | |
# Subject can be set in your I18n file at config/locales/en.yml | |
# with the following lookup: | |
# | |
# en.notifier.order_recieved.subject | |
# | |
def order_recieved | |
@greeting = "Hi" |
This file contains hidden or 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
require 'test_helper' | |
class NotifierTest < ActionMailer::TestCase | |
test "order_recieved" do | |
mail = Notifier.order_recieved | |
assert_equal "Order recieved", mail.subject | |
assert_equal ["[email protected]"], mail.to | |
assert_equal ["[email protected]"], mail.from | |
assert_match "Hi", mail.body.encoded | |
end |