Based on http://bl.ocks.org/mbostock/899711 which uses D3 to draw elements into a google maps overlay layer, but doesn't use d3.geo machinery to draw map geometry. This gist illustrates how to align a D3 mercator projection with google maps so we can do standard d3 mapping stuff on top of the google API.
Easy example on how to put marker on a d3.js map.
You got 2 options:
- using d3.geo.path() which does all the work for you
- using svg circles and translating them via projection(d.geometry.coordinates)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "time" | |
| ) | |
| type Person struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "github.com/codegangsta/negroni" | |
| "github.com/gorilla/context" | |
| "github.com/unrolled/render" | |
| "labix.org/v2/mgo" | |
| "labix.org/v2/mgo/bson" | |
| "log" | |
| "net/http" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python | |
| # | |
| # Simple script showing how to read a mitmproxy dump file | |
| # | |
| ### UPD: this feature is now avaiable in mitmproxy: https://github.com/mitmproxy/mitmproxy/pull/619 | |
| from libmproxy import flow | |
| import json, sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Borrowed from: | |
| # https://github.com/silven/go-example/blob/master/Makefile | |
| # https://vic.demuzere.be/articles/golang-makefile-crosscompile/ | |
| BINARY = superdo | |
| VET_REPORT = vet.report | |
| TEST_REPORT = tests.xml | |
| GOARCH = amd64 | |
| VERSION?=? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM golang:1.9 | |
| RUN mkdir -p /go/src/github.com/purplebooth/example | |
| WORKDIR /go/src/github.com/purplebooth/example | |
| COPY . . | |
| RUN go build -ldflags "-linkmode external -extldflags -static" -a main.go | |
| FROM scratch | |
| COPY --from=0 /go/src/github.com/purplebooth/example/main /main | |
| CMD ["/main"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Text; | |
| using iTextSharp.text.pdf; | |
| namespace PDFExtract | |
| { | |
| public class PDFExtractor | |
| { |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.
- ⌘ : Command key
- ⌃ : Control key
- ⌫ : Delete key
- ← : Left arrow key
- → : Right arrow key
- ↑ : Up arrow key