Skip to content

Instantly share code, notes, and snippets.

@kaspereden
kaspereden / dabblet.css
Created July 20, 2015 10:45 — forked from anonymous/dabblet.css
Center the demo
div {
width: 280px;
height: 280px;
background: #1e90ff;
-webkit-clip-path: polygon(100% 51%, 96% 40%, 89% 29%, 80% 21%, 69% 13%, 57% 6%, 45% 3%, 30% 9%, 19% 14%, 8% 24%, 2% 34%, 0% 49%, 0% 62%, 4% 73%, 13% 84%, 24% 91%, 33% 97%, 44% 99%, 46% 89%, 55% 87%, 65% 86%, 76% 82%, 84% 75%, 92% 67%, 98% 58%);
clip-path: polygon(100% 51%, 96% 40%, 89% 29%, 80% 21%, 69% 13%, 57% 6%, 45% 3%, 30% 9%, 19% 14%, 8% 24%, 2% 34%, 0% 49%, 0% 62%, 4% 73%, 13% 84%, 24% 91%, 33% 97%, 44% 99%, 46% 89%, 55% 87%, 65% 86%, 76% 82%, 84% 75%, 92% 67%, 98% 58%);}
/* Center the demo */
html, body {
height: 100%;
}
@kaspereden
kaspereden / geoFinder.js
Last active July 29, 2022 05:28
Store geolocation in cookie
/*
In order to store the object we 'flatten' the object. This has strange results in the latest version of Safari (8)
*/
navigator.geolocation.getCurrentPosition(function (geolocation) {
// in order to store the location in a cookie we 'flatten' the object to json
var cookieValue = JSON.stringify(geolocation);
});