This file contains hidden or 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
function car() { | |
return { | |
start: function() { | |
console.log("Engine on."); | |
}, | |
accelerate: function() { | |
console.log("Let's go!"); | |
} | |
}; | |
} |
This file contains hidden or 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
post '/create/subscription' do | |
url_params = { | |
:amount => 99, | |
:interval_unit => 'month', | |
:interval_length => 1, | |
:name => 'Example Subscription', | |
:description => 'Regular monthly payments (e.g., for hosting services)', | |
} | |
url = GoCardless.new_subscription_url(url_params) |
This file contains hidden or 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="logo.svg" width="200" height="300"> | |
<img src="logo.svg" data-png-fallback="logo.png" | |
width="200" height="300"> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script> | |
<script> | |
$(function(){ | |
if(!Modernizr.svg) { |
This file contains hidden or 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
@mixin at2x($image_name, $width, $height, $extention: '.png') { | |
background-image: image_url($image_name + $extention); | |
$x2img : $image_name + '@2x' + $extention; | |
@media (-webkit-min-device-pixel-ratio: 1.5), | |
(min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx) { | |
background-image: image_url($x2img); |
This file contains hidden or 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
.logo { | |
background-url('logo.png'); | |
} | |
@media (-webkit-min-device-pixel-ratio: 1.5), | |
(min--moz-device-pixel-ratio: 1.5), | |
(-o-min-device-pixel-ratio: 3/2), | |
(min-device-pixel-ratio: 1.5), | |
(min-resolution: 1.5dppx) { | |
.logo { |
This file contains hidden or 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
(function(i) { | |
'use strict'; | |
console.log(i); // undefined | |
console.log(bar); // function | |
console.log(animals); // undefined | |
console.log('-------------------------'); | |
var i = 2; |
This file contains hidden or 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
<area title=" Outgoings"> | |
<feature type="Lease"> | |
<heading>Lease</heading> | |
<description>94 years remaining</description> | |
</feature> | |
<feature type="Ground Rent/Maintenance"> | |
<heading>Ground Rent/Maintenance</heading> | |
<description>£721.30 per annum.</description> | |
</feature> | |
<feature type="NB"> |
This file contains hidden or 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
@mixin background-image-retina($file, $type, $width, $height) { | |
background-image: url($file + '.' + $type); | |
@media (-webkit-min-device-pixel-ratio: 2), (-moz-min-device-pixel-ratio: 2) { | |
& { | |
background-image: url($file + '@2x.' + $type); | |
-webkit-background-size: $width $height; | |
} | |
} | |
} |
This file contains hidden or 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 next | |
project.images.first(:conditions => ["position > ?", position], :order => "position asc") | |
end | |
def prev | |
project.images.last(:conditions => ["position < ?", position], :order => "position desc") | |
end |