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
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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
var swipeFunc = { | |
touches : { | |
"touchstart": {"x":-1, "y":-1}, | |
"touchmove" : {"x":-1, "y":-1}, | |
"touchend" : false, | |
"direction" : "undetermined" | |
}, | |
touchHandler: function(event) { | |
var touch; | |
if (typeof event !== 'undefined'){ |
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
(function() { | |
'use strict'; | |
/** | |
* # numeric[module] | |
*/ | |
/** | |
* | |
* # Dependent |
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
for (var i = 1; i < 101; i++) { | |
var buzz = (i % 5 == 0) ? 'Buzz' : i; | |
var fizz = (i % 3 == 0) ? 'Fizz' : buzz; | |
var fizzBuzz = (i % 3 == 0 && i % 5 == 0) ? 'FizzBuzz' : fizz; | |
console.log("fizzBuzz: ", fizzBuzz); | |
} |
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
function getScrollPosition() { | |
var last_known_scroll_position = 0; | |
var ticking = false; | |
var bodyEl = document.body; | |
var htmlEl = document.documentElement; | |
var height = Math.max(bodyEl.scrollHeight, bodyEl.offsetHeight, | |
htmlEl.clientHeight, htmlEl.scrollHeight, htmlEl.offsetHeight); | |
window.addEventListener('scroll', function(e) { | |
last_known_scroll_position = window.scrollY; |
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
angular | |
.module('bolighed') | |
.directive('locationImage', LocationImage); | |
function LocationImage($q, $sce, $window, streetviewService) { | |
var apiKey = window.bolighed.google_api_key; | |
var staticMapApiEndPoint = 'https://maps.googleapis.com/maps/api/staticmap'; | |
var streetviewApiEndPoint = 'https://maps.googleapis.com/maps/api/streetview'; |
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
(function() { | |
'use strict'; | |
angular.module('myApp') | |
.factory('horizon', horizonFactory); | |
function horizonFactory() { | |
var horizon = Horizon({ | |
host: 'localhost:8181', | |
secure: true, |
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
/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i |
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
// Native modules | |
var path = require('path'); | |
var fs = require('fs'); | |
// Third party modules | |
var _ = require('lodash'); | |
var config = { | |
numberOfPosts: 10000, | |
template: function(name) { |
OlderNewer