Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
1.9.3p327 :013 > pets = %w(rex nibbles fred) | |
=> ["rex", "nibbles", "fred"] | |
1.9.3p327 :014 > puts pets.map do |pet| | |
1.9.3p327 :015 > pet.upcase | |
1.9.3p327 :016?> end | |
#<Enumerator:0x007f9b4d02a4f0> | |
=> nil | |
1.9.3p327 :017 > puts pets.map(&:upcase) | |
REX | |
NIBBLES |
$(document).on("page:load",function(){ | |
//do ALL THE THINGS :D | |
//see http://stackoverflow.com/questions/17386740/rails-4-turbolinks-and-jquery-dynamic-links-not-playing-nice | |
}); |
-# HTML5 doctype | |
!!! 5 | |
!!! strict | |
!!! XML | |
%html | |
-#ie conditionals | |
/[if IE] | |
%a{ href: "http://www.mozilla.com/en-US/firefox/" } |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
function getRealDimensions(node) { | |
var clone, | |
result; | |
if ( ! node ) { | |
return false; | |
} | |
clone = node.cloneNode(true).show().setStyle('visibility','hidden').appendTo('body'); |
.progress-indicator { | |
position: absolute; | |
height: 40px; | |
overflow: hidden; | |
} | |
.progress-bubble { | |
background-color: #efefef; | |
width: 20px; | |
height: 20px; |
// Don't do this | |
var RecentProblemsComponent = Y.Base.create('prb-recent-problems-component', Y.View, [Y.OHP.Component], { | |
initializer: function() { | |
this.goGetData().then(this.renderAThing); | |
}, | |
renderAThing: function() { | |
//render part of my UI | |
this.nowFetchSomeOtherDataPls().then(this.renderOtherThings); | |
}, |
// You could do this | |
var RecentProblemsComponent = Y.Base.create('prb-recent-problems-component', Y.View, [Y.OHP.Component], { | |
initializer: function() { | |
this.goGetData().then(this.render); | |
}, | |
render: function() { | |
if(this.hasSomeData) { | |
this.hideProgressIndicator(); | |
this.showData; |
<div class='color'></div> | |
<div class='color-20'></div> | |
<div class='color-40'></div> |
<div class='color'></div> | |
<div class='color-dark'></div> | |
<div class='color-darker'></div> |