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
<% @billboard.photos.each do |photo| %> | |
<div class="modal-container" style="display: none;"> | |
<div class="modal-form"> | |
<%= render :partial => 'photos/_sample', :locals => {:resize => 'true', :photo => photo} %> | |
</div> | |
</div> | |
<% end %> |
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
<% @billboard.photos.each do |photo| %> | |
<div class="modal-container" style="display: none;"> | |
<div class="modal-form"> | |
<%= photo.inspect %> | |
</div> | |
</div> | |
<% end %> |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func sum(nums chan int) { | |
acc := 0 | |
for x := range nums { | |
acc += x |
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
package main | |
import ( | |
"fmt" | |
"time" | |
) | |
func section(start int, end int, acc chan int) { | |
for i := start; i <= end; i++ { | |
if i % 3 == 0 || i % 5 == 0 { |
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
$('.dropzone').sortable({ | |
update: function() { | |
console.log($($(this).context).siblings('h4')) | |
} | |
}) |
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 'resolv' | |
def valid_email_domain(domain) | |
Resolv::DNS.open do |dns| | |
mail_servers = dns.getresources(domain, Resolv::DNS::Resource::IN::MX) | |
if mail_servers && !mail_servers.empty? | |
true | |
else | |
false | |
end |
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
var seriesCount = 0; | |
_.each(data, function(values, k) { | |
var series = _.zip(dates, values); | |
console.log(seriesCount); | |
g.append("svg:path") | |
.style('stroke', d3.scale.category10()(seriesCount)) | |
.attr("d", line(series)); | |
seriesCount++; | |
}); |
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
(function() { | |
var TS = function(options) { | |
_.defaults(options, { | |
width: 300, | |
height: 210, | |
margin: 24, | |
min: 0, | |
max: 100 | |
}); |
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
var timeSeries = TS({ | |
container: '.graph', | |
dates: ["2011/12/12", "2011/12/13", "2011/12/14", "2011/12/15", "2011/12/16"], | |
data: { | |
skiing: [1, 2, 0, 4, 5], | |
snowboarding: [0, 3, 6, 2, 0] | |
} | |
}); |
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
VCR.use_cassette('geokit') do | |
Geokit.geocode('Denver, CO') | |
end |