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
class Car { | |
constructor(length, doors) { | |
try { | |
if (doors < 1) | |
throw 'We cannot enter a doorless car.' | |
if (length < 7) | |
throw 'We cannot build that small car.' | |
if (length / doors < 1 || (length-3) < (doors*2)) | |
throw 'We cannot fit that many doors in that car.' | |
} catch(e) { |
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
var $searchForm = $('#search'), | |
$searchPath = $('#searchPath'); | |
$searchPath.change(function() { | |
$searchForm.attr('action', $(this).find('option:selected').data('action')); | |
}); | |
$('#search').submit(function (event) { | |
// code | |
// event.preventDefault(); |
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
var BPM = 120; | |
var BPB = 4; | |
var msFromBPM = Math.round(60000/BPM); | |
setInterval(function(){ | |
if (typeof(beat) === 'undefined') { beat = 1 }; | |
if (beat === 1) { console.log('BLEEP', beat) } | |
else { console.log('bloop', beat) } |
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
# Simple auto-centering for absolute-positioned elements | |
# ============================================================================ | |
do ($ = jQuery, window, document) -> | |
autoCentering = (element) -> | |
@element = element | |
@_name = pluginName | |
@init() | |
pluginName = "autoCentering" |
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
// copy+paste this into your browser's javascript | |
// console on any site running jQuery | |
(function($){ | |
// gutterballing | |
var bowlingBall = false; | |
// scratching fleas | |
setInterval(function(){ |
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
[data-partial=product_details] { | |
} |
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
.image-details-block { | |
.image { float: left; width: 80px; } | |
.details { padding-left: 100px; } | |
} |
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
images/ | |
ajax_spinner.gif | |
logo.png | |
bookmarklet/ | |
header_background.png | |
logo.png | |
icons/ | |
add_12.png | |
delete_18.png | |
email_24.png |
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
.popover { | |
.content { background-color: #F4F3EF; } | |
.inner { | |
position: absolute; | |
left: -14px; | |
width: 295px; | |
padding: 0; | |
.heading { |
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
javascript:(function(a){function f(a){var b=a.find(".actionbar");return b.length?b:a.prepend('<div class="actionbar"><div class="actions"><div class="primary"></div></div></div>')}function e(a,b){var c=b.find(".actions"),d=c.find(".download");d.length||c.prepend('<a href="'+a.streamUrl+'" class="download pl-button" download="'+a.title+'" title="'+a.title+'">Download track</a>')}function d(a,b){var d=null;b.hasClass("nano")?d=f(b.closest(".track-title").find(".track")).css({marginLeft:"18px"}):b.hasClass("small")&&(d=f(b.find(".container"))),d&&c(a,d)}function c(a,b){var c=b.find(".download, .mock-download");if(!c.length){var d=$('<a class="pl-button mock-download"><span>Download</span></a>').css({backgroundImage:"url(http://soundcloud.com/images/icons_mini.png?unicorn26)",backgroundRepeat:"no-repeat",backgroundPosition:"-77px -236px",paddingLeft:"18px"}).attr("download",a.title+".mp3");b.find(".primary").append(d),d.attr("href",a.streamUrl)}}function b(a){var b=$.helpers,f=b.getPlayerTrack(b.getPlayerNode(a)) |
NewerOlder