Skip to content

Instantly share code, notes, and snippets.

View sindre's full-sized avatar

Sindre Wimberger sindre

View GitHub Profile
@sindre
sindre / jquery.plugin.toggle.js
Created November 6, 2014 12:37
JS jQuery ARIA open/close list
/*!
* jQuery lightweight plugin boilerplate
* based on https://github.com/jquery-boilerplate/jquery-patterns/blob/master/patterns/jquery.basic.plugin-boilerplate.js
*/
;(function ( $, window, document, undefined ) {
var pluginName = "homeToggle",
defaults = {
selection: 'a.cl',
// geo-location shim
// currentely only serves lat/long
// depends on jQuery
// doublecheck the ClientLocation results because it may returning null results
;(function(geolocation){
if (geolocation) return;
goog.provide('L.SingleTileWMSLayer');
goog.require('L.Map');
L.SingleTileWMSLayer = L.ImageOverlay.extend({
defaultWmsParams: {
service: 'WMS',
request: 'GetMap',
version: '1.1.1',
@sindre
sindre / index.html
Created January 29, 2013 10:52
HTML Elemente Testseite
<h1>Tests for common HTML elements</h1>
<h5>PARAGRAPHS <span class="alt">&amp;</span> BOXES</h5>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor <sub>sub text</sub> ut labore et <sup>sup text</sup> magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</
@sindre
sindre / leaflet-side-by-side.html
Created September 24, 2012 10:56 — forked from andrewharvey/leaflet-side-by-side.html
Demo web app displaying two web maps side by side in sync with each other based on Leaflet
<html xmlns="http://www.w3.org/1999/xhtml">
<!--
This file is licenced CC0 http://creativecommons.org/publicdomain/zero/1.0/
-->
<head>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8" />
<title>Leaflet Maps Side by Side</title>
<link rel="stylesheet" href="/javascript/leaflet/leaflet.css" type="text/css" />
<!--[if lte IE 8]><link rel="stylesheet" href="/javascript/leaflet/leaflet.ie.css" /><![endif]-->
<style type="text/css">
@sindre
sindre / index.html
Created August 21, 2012 19:19
responsive CSS für A-Tag`12 - http://atag.accessiblemedia.at/2012
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
@sindre
sindre / gist:3003712
Created June 27, 2012 12:20 — forked from madrobby/gist:2997187
The ultimate media query to rule them all ("all" being high DPI/"Retina" screens)
@media (-moz-min-device-pixel-ratio: 1.5), (-o-min-device-pixel-ratio: 3/2), (-webkit-min-device-pixel-ratio: 1.5), (min-device-pixel-ratio: 1.5), (min-resolution: 1.5dppx) {
/* "retina" styles */
}
@sindre
sindre / TileLayer.TileJSON.js
Created April 10, 2012 14:56 — forked from DGuidi/TileLayer.TileJSON.js
Leaflet TileCanvas
L.TileLayer.TileJSON = L.TileLayer.Canvas.extend({
options: {
debug: false
},
tileSize: 256,
initialize: function (options) {
L.Util.setOptions(this, options);
@sindre
sindre / mobile tags for your '<head>'
Created June 21, 2011 15:06 — forked from chuanxshi/mobile tags for your '<head>'
mobile tags for your '<head>'
<!doctype html>
<!-- Helpful things to keep in your <head/>
// Shi Chuan, https://github.com/shichuan/mobile-html5-boilerplate
-->
<head>
<!-- consider using below meta tags if you want to disable format detection by default -->
<meta name="format-detection" content="telephone=no"/>
<meta name="format-detection" content="address=no"/>
<!-- consider using below link tag if the page is duplicate content of a desktop version -->
@sindre
sindre / ipadlabels
Created June 21, 2011 15:00 — forked from anonymous/ipadlabels
iOS Label fix
var iPadLabels = function () {
function fix() {
var labels = document.getElementsByTagName('label'),
target_id,
el;
for (var i = 0; labels[i]; i++) {
if (labels[i].getAttribute('for')) {
labels[i].onclick = labelClick;
}