Skip to content

Instantly share code, notes, and snippets.

View tagliala's full-sized avatar
🏢
Working from Rome

Geremia Taglialatela tagliala

🏢
Working from Rome
View GitHub Profile
@tagliala
tagliala / style.json
Created December 19, 2012 20:08
Google Maps Facebook Style
[
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{ "color": "#b1bdd6" }
]
},{
"featureType": "water",
"elementType": "labels.text.fill",
@tagliala
tagliala / sidebar.js
Created October 27, 2012 23:46
[W.I.P] Facebook-like sidebar for twitter bootstrap
/* =============================================================
* bootstrap-sidebar.js v2.1.2
* http://twitter.github.com/bootstrap/javascript.html#sidebar
* =============================================================
* Copyright 2012 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@tagliala
tagliala / btn-group-radio.css
Last active October 11, 2017 09:00
Pure CSS3 Bootstrap Radio Buttons
.btn-group-radio input[type=radio] {
visibility: hidden;
position: absolute !important;
top: -9999px !important;
left: -9999px !important;
}
.btn-group-radio input[type=radio]:checked + .btn {
color: #333333;
background-color: #e6e6e6;
@tagliala
tagliala / gist:3655017
Created September 6, 2012 11:19
distance from
# http://www.movable-type.co.uk/scripts/latlong.html
def distance_from(place, unit = :km)
radius = (unit == :km) ? 6371 : 3959
dLat = (place.source[:lat] - source[:lat]) * Math::PI / 180
dLon = (place.source[:lng] - source[:lng]) * Math::PI / 180
lat1 = source[:lat] * Math::PI / 180
lat2 = place.source[:lat] * Math::PI / 180
a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2)
c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a))