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
<style type="text/css" media="screen"> | |
#map { | |
-webkit-transition: all 0.5s ease-in-out; | |
-webkit-transform: scale(1); | |
-moz-transform: scale(1); | |
-o-transform: scale(1); | |
opacity: 1; | |
} |
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
namespace :db do | |
namespace :fixtures do | |
desc "Attach image for the current RAILS_ENV for a given CLASS (and optional ATTACHMENT)" | |
task :loadimages => :environment do | |
require 'open-uri' | |
io = open(URI.parse("http://upload.wikimedia.org/wikipedia/commons/9/96/Barbados_beach.jpg")) | |
def io.original_filename; base_uri.path.split('/').last; end | |
image = io.original_filename.blank? ? nil : io | |
for_all_attachments do |instance, name| | |
instance.send("#{name}=",image) |
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
Processing Admin::PushesController#create (for 195.101.90.3 at 2011-01-07 17:49:48) [POST] | |
Parameters: {"commit"=>"Send notification", "authenticity_token"=>"uq4L86hJHiChF17jECA285TMRj6AHfSx8cv4jQThlsM=", "push"=>{"notification"=>{"aps"=>{"badge"=>"1", "sound"=>"push.caf", "alert"=>"9 nouvelles offres d’emploi pour débuter l’année dans les starting-blocks"}, "tab"=>"Jobs"}, "header"=>{"incremental_badge"=>"true"}}} | |
{"notification":{"aps":{"badge":1,"alert":"9 nouvelles offres d\u2019emploi pour d\u00e9buter l\u2019ann\u00e9e dans les starting-blocks","sound":"push.caf"},"tab":"Jobs"},"header":{"incremental_badge":"true"}} | |
Processing Admin::PushesController#create (for 195.101.90.3 at 2011-02-04 15:44:11) [POST] | |
Parameters: {"commit"=>"Send notification", "authenticity_token"=>"5K0IJtpgk53ML3R0VD8mFUI0shnNY4TZJZWwk78c8F0=", "push"=>{"sound"=>"push.caf", "message"=>"Twittez l’offre spéciale d’étapes : et gagnez des abonnements gratuits", "tab"=>"News"}} | |
"{\"notification\":{\"aps\":{\"badge\":1,\"sound\":f |
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
RAILS_ENV="test" rake db:fixtures:loadimages CLASS="Image"<br /> .................. Done |
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
<script type="text/javascript"> | |
var _gaq = _gaq || []; | |
_gaq.push(['_setAccount', 'UA-1622489-8']); | |
_gaq.push(['_trackPageview']); | |
(function() { | |
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; | |
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); |
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
@font-face { | |
font-family: "NeuzeitTextbookRegular"; | |
src: url(/fonts/neuzeittextbook_regular-webfont.eot?1300874573); | |
src: local("☺"), url(/fonts/neuzeittextbook_regular-webfont.woff?1300874573) format("woff"), url(/fonts/neuzeittextbook_regular-webfont.ttf?1300874573) format("truetype"), url("/fonts/neuzeittextbook_regular-webfont.svg#webfontJ6Q9a4kP") format("svg"); | |
font-weight: normal; | |
font-style: normal; } |
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
When "filling a new todo task" do | |
Then "should see its newly added task" do | |
visit '/' | |
fill_in "task_message", :with => "I have to read some BDD books" | |
click_button "Todo!" | |
within("#nav_badge") do | |
page.should have_content(3) | |
end | |
within("#todo_badge") do | |
page.should have_content(3) |
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
def index | |
@magazine = Magazine.published.first | |
@published_magazines = Magazine.published | |
if @magazine | |
@summaries = @magazine.pages.summaries | |
@description = @magazine.metadescription | |
redirect_to magazine_url(@magazine) | |
else | |
redirect_to new_magazine_path |
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
f = File.new("clean.csv", 'a') | |
File.open('members_Pyramyd_NTCV_Sep_6_2011.csv').each do |line| | |
f.puts line.split(",")[0..2].join(',') | |
end |
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
<script type="text/javascript" charset="utf-8"> | |
var currentPage = 5; | |
function nearBottomOfPage() { | |
return scrollDistanceFromBottom() < 150; | |
} | |
function scrollDistanceFromBottom(argument) { | |
return $(document).height()-$(window).scrollTop()-$(window).height(); |