Skip to content

Instantly share code, notes, and snippets.

View gdey's full-sized avatar

Gautam Dey gdey

  • San Diego, California, USA
View GitHub Profile
@gdey
gdey / main.go
Last active March 11, 2021 04:22
Quine for golang using go1.6
package main
import _ "embed"
//go:embed main.go
var s string
func main() { print(s) }
@gdey
gdey / intersecting_lines_points.wkt
Last active December 16, 2019 19:43
Issue inserting point into triangulation
MULTIPOINT (-13047467.01 3867715.532,-13047466.45 3867712.862,-13047465.89 3867710.192)
@gdey
gdey / gist:38eca8aea9ae85e5d2c7f8946d89f910
Created November 14, 2019 18:49
Failed to insert point for triangulation
2019/11/14 10:10:52 subdivision.go:70:
TestCase:
{
Desc: "error:Failed to insert point",
Points: [][2]float64{[2]float64{-1.3054230991e+07, 3.869538565e+06}, [2]float64{-1.3054230991e+07, 3.87016917e+06}, [2]float64{-1.3053600386e+07, 3.87016917e+06}, [2]float64{-1.3054230364e+07, 3.869872673e+06}, [2]float64{-1.3054229077e+07, 3.869871392e+06}, [2]float64{-1.3054227785e+07, 3.869870116e+06}, [2]float64{-1.3054226489e+07, 3.869868844e+06}, [2]float64{-1.3054225188e+07, 3.869867577e+06}, [2]float64{-1.3054223884e+07, 3.869866314e+06}, [2]float64{-1.3054222575e+07, 3.869865056e+06}, [2]float64{-1.3054221262e+07, 3.869863803e+06}, [2]float64{-1.3054222141e+07, 3.869885233e+06}, [2]float64{-1.3054217016e+07, 3.869879823e+06}, [2]float64{-1.3054220842e+07, 3.869863404e+06}, [2]float64{-1.3054219772e+07, 3.869861936e+06}, [2]float64{-1.3054218688e+07, 3.869860477e+06}, [2]float64{-1.3054217593e+07, 3.869859028e+06}, [2]float64{-1.3054216484e+07, 3.869857588e+06}, [2]float64{-1.3054202733e+07, 3.869864076e+06},
<html>
<head>
<title>Address</title>
</head>
<body>
<h1>Dates</h1>
<ul>
<li><a href="#2019-10-07 00:00:00 +0000 UTC">2019-10-07 00:00:00 +0000 UTC</a></li>
<li><a href="#2019-10-03 00:00:00 +0000 UTC">2019-10-03 00:00:00 +0000 UTC</a></li>
@gdey
gdey / MVT2ToLineString
Last active September 12, 2019 23:31
Quick and dirty MVT tile parameters values
package main
import (
"fmt"
"strings"
)
func decode(i int64) int64 {
return (i >> 1) ^ (-(i & 1))
}
«Front-Matter
|Author: Gautam Dey<gautam.dey77@gmail.com>
|Date: 8 Feb 2017
Here is quick note about what not to do. When writing quick check in Perl this is no good.
«code|Lang: Perl;
my $server = @_ % 2 ? shift : "";
»
@gdey
gdey / index.html
Created December 8, 2016 16:41
A quick static html file for interacting with webdist
<!doctype html>
<!---
This is a simple html/js page for interacting with an instance of webdis (https://github.com/nicolasff/webdis)
-->
<html lang="en">
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1" />
@gdey
gdey / 2015-Nov-01-Starting.gdtxt
Last active February 9, 2017 15:56
Adventures in trying to port go to xen.
«front-matter
| Author : Gautam Dey<gautam.dey77@gmail.com>
| Date : 01 Nov 2015
;
»
Though I have been looking into this project on and off for the last two months or so. Mostly been looking at XEN to see if
it made sense to do. I think it does and should be fairly easy to do once I figure out how to do it from the go compiler side.
@gdey
gdey / main.go
Created October 28, 2015 03:58
Basic template for a correctly cancelable go application.
/* Here is a basic template for a cancellable go app using ctr-c.
*/
package main
import (
"flag"
"fmt"
"io"
"log"