Skip to content

Instantly share code, notes, and snippets.

View hsavran's full-sized avatar

Hasan Savran hsavran

View GitHub Profile
@hsavran
hsavran / GetGeoJSON.sql
Created September 9, 2017 18:38 — forked from matt40k/GetGeoJSON.sql
Turns SQL Server Geography to GeoJSON
CREATE FUNCTION GetGeoJSON (@geo geography)
RETURNS varchar(max)
WITH SCHEMABINDING
/*
* Reference: http://stackoverflow.com/questions/6506720/reformat-sqlgeography-polygons-to-json
*/
AS
BEGIN
DECLARE @Result varchar(max)
SELECT @Result = '{' +
@hsavran
hsavran / hacks.js
Created November 29, 2011 17:50 — forked from notmasteryet/hacks.js
Hack for IE to support pdf.js
(function() {
try {
var a = new Uint8Array(1);
return; //no need
} catch(e) { }
function subarray(start, end) {
return this.slice(start, end);
}