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
<img src="https://bucketname.s3.amazonaws.com/path/filename.ext"> |
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
AppName::App.helpers do | |
class FormatData | |
# From value to human format | |
def self.to_human(value) | |
if value =~ /_/ | |
words = value.split('_') | |
words.map!{ |word| word.capitalize } | |
return words.join(' ') |
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
gem 'slim', :git => 'git://github.com/brennancheung/slim.git', :branch => 'angularjs_support' |
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
.DS_Store | |
log/**/* | |
tmp/**/* | |
bin/* | |
vendor/gems/* | |
!vendor/gems/cache/ | |
.sass-cache/* | |
db/*.db | |
.*.sw* | |
.sass-cache |
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
Slim::Engine.default_options[:pretty] = 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
Stc::App.helpers do | |
class Readable | |
def self.date(utc) | |
utc.to_date.strftime("%B %-d, %Y") | |
end | |
def self.text_from_value(value) | |
_text = value.split('_') |
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
h1 This #{foo} is here. |
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
equalize_heights = (selector) -> | |
max_height = 0 | |
$(selector).each -> | |
height = $(this).outerHeight() | |
max_height = height if height > max_height | |
$(selector).height(max_height) |
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
// Responsive Mixin | |
@mixin responsive($width) | |
@if $width == 300 | |
@media all and (min-width:300px) | |
@content | |
@if $width == 600 | |
@media all and (min-width:600px) |
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
class String | |
VALID_EMAIL_REGEX = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i | |
def is_valid_email? | |
if self.match(VALID_EMAIL_REGEX) | |
return true | |
else | |
return false | |
end | |
end |