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
#!/bin/bash | |
set -e | |
BUILD_URL='http://build.chromium.org/buildbot/snapshots/sub-rel-mac/' | |
update_google_chrome() { | |
get_latest_revision_number | |
download_latest_revision | |
extract_code |
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 PDoc | |
module Generators | |
module Html | |
CODE_BLOCK_REGEXP = /(?:\n\n|\A)(?:\s{4,}lang(?:uage)?:\s*(\w+)\s*\n)?((?:\s{4}.*\n*)+)(^\s{0,3}\S|\z)?/ | |
attr_reader :default_language, :highlighter | |
class SyntaxHighlighter | |
def initialize(options = {}) | |
@default_language = options[:default_language] ||= :javascript | |
@highlighter = options[:highlighter] ||= :none |
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
// Create a carousel in one-line code | |
var carousel = new S2.UI.Carousel("productbrowser", {slider: 'slider'}); |
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
// Click on labels | |
$('productbrowser').on("mousedown", ".label", function(event, element) { | |
var steps = {'pb-cat1': 0, 'pb-cat2': 6, 'pb-cat3': 13, 'pb-cat4': 24}; | |
carousel.goTo(steps[element.id]); | |
event.stop(); | |
}); |
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
// Click on track or labels | |
track.observe("mousedown", function(event) { | |
var element = event.findElement(), | |
steps = {'pb-cat1': 0, 'pb-cat2': 6, 'pb-cat3': 13, 'pb-cat4': 24}, | |
localMouseX = event.pointerX() - track.viewportOffset().left, | |
pos = (localMouseX - slider.getWidth() / 2) / width * carousel.maxPos; | |
if (element.id in steps) { | |
carousel.goTo(steps[element.id] || pos); | |
} | |
else { |
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
// Smallest code to make a slider behavior by dragging the slider's handle | |
function sliderMousedown(event) { | |
event.stop(); | |
mouseX = event.pointerX(), left = parseFloat(slider.style.marginLeft || 0); | |
// Observe mousemove and mouseup on document for dragging behavior | |
document.observe('mousemove', sliderMousemove).observe('mouseup', sliderMouseup); | |
} | |
function sliderMousemove(event) { |
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
new S2.UI.Carousel("hcarousel", {paginator: 'hpaginate', cycle: "loop"}); |
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
<div id="hcarousel" class="ui-carousel-horizontal"> | |
<div id="hpaginate" class="ui-carousel-paginate"> | |
<div class="ui-icon ui-icon-circle-arrow-w ui-carousel-prev"></div> | |
<ul></ul> | |
<div class="ui-icon ui-icon-circle-arrow-e ui-carousel-next"></div> | |
</div> | |
<div class="ui-carousel-container"> | |
<ul> | |
<li class="item"> | |
... |
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
new S2.UI.Carousel("hcarousel"); |
OlderNewer