Skip to content

Instantly share code, notes, and snippets.

for (var i=0; i<arr.length; i++){
if(arr[i] === item){
return i;
}
}
return -1;
@climboid
climboid / index.html
Last active June 27, 2018 16:17
Leaflet example to draw polygons on map
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Untitled</title>
<link rel="author" href="humans.txt">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" integrity="sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ==" crossorigin="">
@climboid
climboid / gist:753b8631c8bce6650829
Created September 24, 2015 13:41
Just a SCSS grid with configurable gutters
$gutter: 30px;
$columns: 12;
$break-xs: 414px;
$break-sm: 768px;
$break-md: 992px;
$break-lg: 1200px;
.grid {
background: white;
margin: 0 0 $gutter 0;
@climboid
climboid / exampel unit test
Created March 29, 2015 10:43
Unit test failing
'use strict';
describe('Offers : controller', function(){
beforeEach(module('client'));
var $scope,
$rootScope,
controller,
genericService;