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" src="http://i0.poll.fm/survey.js" charset="UTF-8"></script> | |
<noscript><a href="http://polldaddy.com/s/how-do-you-like-new-home-tours">Take Our Survey!</a></noscript> | |
<script type="text/javascript"> | |
polldaddy.add( { | |
type: 'button', | |
title: 'Take Our Survey!', | |
style: 'inline', | |
id: '8EF3172A8164D399' | |
} ); | |
</script> |
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
<!-- Begin MailChimp Signup Form --> | |
<link href="http://cdn-images.mailchimp.com/embedcode/classic-081711.css" rel="stylesheet" type="text/css"> | |
<style type="text/css"> | |
#mc_embed_signup{background:#fff; clear:left; font:14px Helvetica,Arial,sans-serif; } | |
/* Add your own MailChimp form style overrides in your site stylesheet or in this style block. | |
We recommend moving this block and the preceding CSS link to the HEAD of your HTML file. */ | |
</style> | |
<div id="mc_embed_signup"> | |
<form action="http://trnk-newyork.us4.list-manage1.com/subscribe/post?u=83d31755b5a57f780de73da26&id=ea579a7f52" method="post" id="mc-embedded-subscribe-form" name="mc-embedded-subscribe-form" class="validate" target="_blank" novalidate> | |
<h2>Subscribe to our mailing list</h2> |
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
# Where I ended up... | |
class Bob | |
def hey input | |
talking = Phrase.new(input) | |
return 'Fine. Be that way.' if talking.silent? | |
return 'Woah, chill out!' if talking.yelling? |
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
# Where I ended up... | |
class DNA < String | |
def to_rna | |
tr('T','U') | |
end | |
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
# Where I ended up... | |
class Phrase < String | |
def word_count | |
words.each_with_object(Hash.new(0)) { |word, word_count| word_count[word] += 1 } | |
end | |
def words | |
downcase.scan(/\w+/) |
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
.two-column { | |
-moz-column-count: 2; /* Firefox */ | |
-webkit-column-count: 2; /* Safari and Chrome */ | |
column-count: 2; | |
-moz-column-gap:40px; /* Firefox */ | |
-webkit-column-gap:40px; /* Safari and Chrome */ | |
column-gap:40px; | |
} |
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
The stack: | |
OS | |
Web server | |
application server | |
database server | |
more.... (caching, any tools to keep an up and running) | |
A fresh rails development stack: | |
Mac OSX - WEBrick - SQLite |
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
<%= form_for [@user, @project] do |f| %> | |
<% if @project.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@project.errors.count, "error") %> prohibited this project from being saved:</h2> | |
<ul> | |
<% @project.errors.full_messages.each do |msg| %> | |
<li><%= msg %></li> | |
<% end %> | |
</ul> |
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
<html> | |
<head> | |
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script> | |
<script src="http://www.zurb.com/playground/javascripts/plugins/jquery.annotate.js"></script> | |
<style type="text/css"> | |
.black { | |
background: black; | |
height: 5px; | |
width: 5px; |
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
#FIZZ BUZZ | |
#Counts up from 1 to 100 | |
#puts 'fizz' if the number is divisible by 3 | |
#puts 'buzz' if the number is divisible by 5 | |
#puts 'fizzbuzz' if the number is divisible by 3 and 5 | |
(1..100).each do |number| | |
if (number % 3 == 0) && (number % 5 == 0) |