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
// Only one of the strings in the list of colors gets interpolated, thanks | |
// to Stylus converting the color keywords to hex values. | |
// Thanks, Stylus! | |
li | |
for color in red pink orange yellow green blue purple brown black shit | |
&.{color} | |
background: color | |
// What I had to do instead to make it work. Note that simply wrapping the |
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
<!doctype html> | |
<html lang="en-US"> | |
<head> | |
<title></title> | |
<meta charset="UTF-8" /> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> | |
</head> | |
<body> | |
</body> |
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
<select name="state"> | |
<option>AK</option> | |
<option>AL</option> | |
<option>AR</option> | |
<option>AZ</option> | |
<option>CA</option> | |
<option>CO</option> | |
<option>CT</option> | |
<option>DC</option> | |
<option>DE</option> |
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
console.clog = function() { | |
var format = "font: normal 18px 'Comic Sans MS', Chalkboard; color: purple;"; | |
if (arguments.length > 1) { | |
console.log("%c" + arguments[0], format, [].slice.call(arguments, 1)); | |
} | |
else { | |
console.log("%c" + arguments[0], format); | |
} | |
}; |
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
module UiHelper | |
def dummy_image(width, height, background=nil, text=nil) | |
background = background ? "/#{background}" : "" | |
text = text ? "/#{text}" : "" | |
content_tag :img, nil, alt: "", "data-src" => "/placeholder/#{width}x#{height}#{background}#{text}" | |
end | |
def lorem_paragraph(quantity = 3) | |
Faker::Lorem.paragraphs(quantity).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
class WireframesController < ActionController::Base | |
public_pages = [:sign_in, :confirm_registration, :homepage, :register, :business_admin_layout] | |
survey_pages = [:survey_1, :survey_2, :survey_3] | |
before_filter :admin_layout, :except => public_pages + survey_pages | |
before_filter :public_layout, :only => public_pages, :except => :business_admin_layout | |
before_filter :survey_layout, :only => survey_pages | |
def admin_layout | |
render :layout => "nuguava_admin" | |
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
$("a[data-method='delete']").live("click.delete", function() { | |
var $e = $(this); | |
if ($e.attr("data-confirm")) { | |
if (!confirm($e.attr("data-confirm"))) { | |
return false; | |
} | |
} | |
var $form = $("<form />"); | |
$("<input />").attr({ | |
type: "hidden", |
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
var isIphone = (function() { | |
return navigator.userAgent.match(/iPhone|iPod/i) != null; | |
})(); | |
var isIpad = (function() { | |
return navigator.userAgent.match(/iPad/i) != null; | |
})(); |
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
A B C D E F G | |
1 + + + | |
2 + + + | |
3 + + + + + + + | |
4 + + + + + + | |
5 + + + + + + + | |
6 + + + | |
7 + + + | |
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 dummy_image(dimensions, bg_color="cccccc", fg_color="333333") | |
"http://dummyimage.com/#{dimensions}/#{bg_color}/#{fg_color}" | |
end |
OlderNewer