Skip to content

Instantly share code, notes, and snippets.

View bartekupartek's full-sized avatar

Bartłomiej Różański bartekupartek

View GitHub Profile
@bartekupartek
bartekupartek / gist:b5900ff67adb14fe91b82ccc33ffdd4f
Created April 19, 2016 15:53 — forked from sconnelley/gist:23dd7d6e7314cbdcb0b3
Mercator Projection, from Google with Google-ly bits removed.
var Mercator = (function(){
/**
Mercator Projection
ref: https://developers.google.com/maps/documentation/javascript/examples/map-coordinates?csw=1
**/
function MercatorProjection(tileSize) {
this.tileSize = tileSize || 256;
this.ONE_DEGREE = Math.PI / 180;
@bartekupartek
bartekupartek / bcp47.ex
Created April 15, 2016 12:09 — forked from erikreedstrom/bcp47.ex
Elixir module for parsing bcp 47 (https://tools.ietf.org/html/bcp47) spec'd language tags.
defmodule BCP47 do
@moduledoc ~S"""
Main BCP47 module.
The `BCP47` module provides a parser for
[bcp 47](https://tools.ietf.org/html/bcp47) spec'd language tags.
"""
@type tag :: String.t
@bartekupartek
bartekupartek / blank.ex
Created April 15, 2016 12:09 — forked from erikreedstrom/blank.ex
Blank protocol for Elixir
defmodule Blank do
@moduledoc """
Tools around checking and handling undefined or blank data.
"""
@doc """
Returns `true` if data is considered blank/empty.
"""
def blank?(data) do
Blank.Protocol.blank?(data)