Skip to content

Instantly share code, notes, and snippets.

function getMargin(section) {
var viewPortHeight = $(window).height()
var sectionHeight = $(section).height()
, difference = (viewPortHeight - sectionHeight)
, margin = (difference > 0) ? difference / 2 : 0
// Max view height of 500 (divided by 2 is 250)
return Math.min(250, margin)
}
ou are using '.rvmrc', it requires trusting, it is slower and it is not compatible with other ruby managers,
you can switch to '.ruby-version' using 'rvm rvmrc to [.]ruby-version'
or ignore this warning with 'rvm rvmrc warning ignore /Users/adriandelbalso/workspace/brief/.rvmrc',
'.rvmrc' will continue to be the default project file in RVM 1 and RVM 2,
to ignore the warning for all files run 'rvm rvmrc warning ignore all.rvmrcs'.
Warning! PATH is not properly set up, '/Users/adriandelbalso/.rvm/gems/ruby-1.9.3-p448/bin' is not available,
usually this is caused by shell initialization files - check them for 'PATH=...' entries,
to fix run: 'rvm use ruby-1.9.3-p448'.
Gemset 'brief' does not exist, 'rvm ruby-1.9.3-p429 do rvm gemset create brief' first, or append '--create'.
// Every style that will be repeated more than once should be written as a mixin
btn-states($btnColor) {
background-color: $btnColor;
&:hover {
background-color: darken($btnColor, 15%);
}
&:active {
@adelbalso
adelbalso / gist:8058613
Created December 20, 2013 17:49
How to add a new organization (needed for remote connection via IP)
o=Organization.first
o.additional_domains << '192.168.1.9'
o.save
TO BUILD:
From the deployer repo, run bundle exec bin/build <environment> <project> <branch>
From the prompt, run: rolling_build!
TO BUILD TO PRODUCTION:
git co production
git merge master