Skip to content

Instantly share code, notes, and snippets.

View shprink's full-sized avatar
🏠
Working from home

Julien Renaux shprink

🏠
Working from home
View GitHub Profile
// http://www.geonames.org/BD/largest-cities-in-bangladesh.html
var cities = []; [].forEach.call(document.querySelectorAll('table.restable a:not([rel=nofollow])'), function(el){console.log(el.innerText); if (el.innerText) cities.push(el.innerText)}); console.log(cities.join(','))
var this.options = {
count: 3,
from: -60,
to: 60
};
var from = Math.max(-90, Math.min(90, +this.options.from));
var to = Math.max(-90, Math.min(90, +this.options.to));
var rotateScale = d3.scale.linear().domain([0, this.options.count - 1]).range([from, to]);
.directive('headerShrink', function($document) {
return {
restrict: 'A',
link: function($scope, $element, $attr) {
var y = 0,
prevY = 0,
scrollDelay = 0.4,
scrollTop,
fadeAmt;