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
<style> | |
[data-custom-class='body'], [data-custom-class='body'] * { | |
background: transparent !important; | |
} | |
[data-custom-class='title'], [data-custom-class='title'] * { | |
font-family: Arial !important; | |
font-size: 26px !important; | |
color: #000000 !important; | |
} | |
[data-custom-class='subtitle'], [data-custom-class='subtitle'] * { |
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
viewport_width = $(window).width() | |
ideal_height = parseInt($(window).height() / 2) | |
summed_width = photos.reduce ((sum, p) -> sum += p.get('aspect_ratio') * ideal_height), 0 | |
rows = Math.round(summed_width / viewport_width) | |
if rows < 1 | |
# (2a) Fallback to just standard size | |
photos.each (photo) -> photo.view.resize parseInt(ideal_height * photo.get('aspect_ratio')), ideal_height | |
else | |
# (2b) Distribute photos over rows using the aspect ratio as weight |
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
2015-06-11T09:51:41.947316+00:00 app[web.1]: ETHON: performed EASY effective_url=https://xxx-xxx.s3.eu-central-1.amazonaws.com/1/954c457c-bb5a-498f-b1e8-7a8fd0d63ce5/e5f7bd3d-514e-4bf5-b88b-3923f1a9cdf4.jpg response_code=200 return_code=ok total_time=1.953845 | |
2015-06-11T09:51:42.146359+00:00 app[web.1]: ETHON: performed EASY effective_url=https://xxx-xxx.s3.eu-central-1.amazonaws.com/1/954c457c-bb5a-498f-b1e8-7a8fd0d63ce5/ba66e48e-5e3e-4618-acc5-31648c650ff4.jpg response_code=200 return_code=ok total_time=1.95379 | |
2015-06-11T09:51:42.273305+00:00 app[web.1]: ETHON: performed EASY effective_url=https://xxx-xxx.s3.eu-central-1.amazonaws.com/1/954c457c-bb5a-498f-b1e8-7a8fd0d63ce5/cdfa0ace-f09b-46b1-b490-2a13acc463ab.jpg response_code=200 return_code=ok total_time=1.956318 | |
2015-06-11T09:51:42.570261+00:00 app[web.1]: ETHON: performed EASY effective_url=https://xxx-xxx.s3.eu-central-1.amazonaws.com/1/954c457c-bb5a-498f-b1e8-7a8fd0d63ce5/66072000-02cd-42cd-8d01-7bb3ddb3fcfb.jpg response_code=200 return_code=ok total |
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
$ -> | |
IDLE_TIMEOUT = 120 | |
CheckIdleTime = -> | |
if (new Date() - Date.parse(window.localStorage.getItem('IDLE')) >= IDLE_TIMEOUT*1000) | |
$("#logout-button").trigger "click" | |
document.onkeydown = document.onmousemove = document.onclick = -> | |
window.localStorage.setItem('IDLE', new Date()) |
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
BJS: | |
name: Beijing | |
country: China | |
BKK: | |
name: Bangkok | |
country: Thailand | |
OSA: | |
name: Osaka | |
country: Japan | |
SPK: |
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
_is_css_blur_supported = (-> | |
_supported = 'dontknow' | |
return -> | |
return _supported unless _supported == 'dontknow' | |
el = $('<div/>') | |
$(document.body).append(el) | |
el[0].style.webkitFilter = "grayscale(1)" | |
_supported = window.getComputedStyle(el[0]).webkitFilter == "grayscale(1)" | |
el.remove() | |
return _supported |
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
# Linear partition | |
# Partitions a sequence of non-negative integers into k ranges | |
# Based on Óscar López implementation in Python (http://stackoverflow.com/a/7942946) | |
# Also see http://www8.cs.umu.se/kurser/TDBAfl/VT06/algorithms/BOOK/BOOK2/NODE45.HTM | |
# Dependencies: UnderscoreJS (http://www.underscorejs.org) | |
# Example: linear_partition([9,2,6,3,8,5,8,1,7,3,4], 3) => [[9,2,6,3],[8,5,8],[1,7,3,4]] | |
linear_partition = (seq, k) => | |
n = seq.length | |