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
helpers do | |
# Acts as a thin wrapper for image_tag and generates a srcset attribute for regular image tags | |
# for usage with responsive images, supports middleman's asset_path helper. | |
# | |
# image_set_tag 'pic_1980.jpg', { 'pic_640.jpg' => '640w', 'pic_1024.jpg' => '1024w', 'pic_1980.jpg' => '1980w' }, sizes: '100vw', class: 'my-image' | |
# | |
# => <img src="/assets/ants_1980.jpg" srcset="/assets/pic_640.jpg 640w, /assets/pic_1024.jpg 1024w, /assets/pic_1980.jpg 1980w" sizes="100vw" class="my-image"> | |
# | |
def image_set_tag(source, srcset = {}, options = {}) | |
srcset = srcset.map { |src, size| "#{asset_path(:images, src)} #{size}" }.join(', ') |
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
#= require jquery | |
#= require jquery-sort | |
$locationsContainer = $('#locations') | |
locationsData = $locationsContainer.data('locations') | |
currentCoords = latitude: 0, longitude: 0 | |
locations = [] | |
firstRun = true | |
if typeof (Number::toRad) is 'undefined' |
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
.something | |
.selector | |
.svg | |
.selector | |
.backgroundsize | |
.selector | |
.svg.backgroundsize |
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
// this = marker under mouse | |
const matrix = this.getScreenCTM() | |
.translate(+this.getAttribute('cx'), +this.getAttribute('cy')); | |
const graphDiv = document.getElementById(graphOptions.chart.id).getBoundingClientRect(); | |
let tooltTipLeftpx = matrix.e - graphDiv.left; | |
if (tooltTipLeftpx > (graphOptions.chart.width - (graphOptions.chart.padding * 1.5))) { | |
tooltTipLeftpx -= graphOptions.chart.padding * 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
.cycle-slideshow.auto{data: { cycle_loader: true, cycle_progressive: "#slideshow-images" }} | |
-# default image loaded | |
= image_tag "image0.jpg", alt: "" | |
%script#slideshow-images{type: "text/cycle"} | |
- image_count = 6 | |
[ | |
- (1..image_count).each_with_index do |i| | |
- path = image_path("image#{i}.jpg") |
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
console.log('HELLO WORLD'); |
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 get-jira-card-number { | |
# Assuming branch names have the following body: XX-1234-Title, | |
# we are only interested in XX-1234. | |
git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3-8 | cut -d"-" -f 1-2 | |
} | |
function jira-card-number-commit { | |
local number=`get-jira-card-number` | |
local message=$1; |
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
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 14, | |
// font family with optional fallbacks | |
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace', | |
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk) | |
cursorColor: 'rgba(248,248,248,0.8)', |
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
#!/bin/sh | |
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep ".[j|t]sx\{0,1\}$") | |
TSLINT="$(git rev-parse --show-toplevel)/WebClient/node_modules/.bin/tslint" | |
if [[ "$STAGED_FILES" = "" ]]; then | |
exit 0 | |
fi | |
PASS=true |