Skip to content

Instantly share code, notes, and snippets.

@alediaferia
alediaferia / countries.go
Created January 3, 2018 19:50
An array of country names in Go
var Countries = []string{
"Afghanistan",
"Albania",
"Algeria",
"American Samoa",
"Andorra",
"Angola",
"Anguilla",
"Antarctica",
"Antigua and Barbuda",
@wknowles
wknowles / creating-coastal-vignettes-for-web-mapping.md
Last active December 31, 2017 17:27
a guide to creating coastal vignettes for use in web maps. Using Natural Earth data, GDAL and QGIS.

Creating coastal vignettes for web mapping.

Summary

To start with I downloaded Natural Earth 1:50m land shapefile. This was then reprojected to Web Mercator / EPSG:3857. I ran a series of buffers on the reprojected shapefile within QGIS. These were then combined, exported to Mapbox and styled. The final map turned out like this:

coastal vignetts

View the full web map on Mapbox.

@roachhd
roachhd / README.md
Created December 8, 2014 23:09
Games on GitHub

Games on GitHub

Below is a list of open source games and game-related projects that can be found on GitHub - old school text adventures, educational games, 8-bit platform games, browser-based games, indie games, GameJam projects, add-ons/maps/hacks/plugins for commercial games, libraries, frameworks, engines, you name it.

Contributing

If you'd like to add a repository to the list, please create an Issue, or fork this repository and submit a pull request.

Help: MarkDown Help, Markdown Cheatsheet

@msbarry
msbarry / README.md
Last active June 25, 2024 15:25
Visvalingam vs. Douglas-Peucker

Two well-known algorithms for polyline simplification are the Douglas Peucker and Visvalingam algorithms.

The Douglas Peucker algorithm uses a recursive divide-and-conquer approach. It starts by drawing a straight line from the first point to the last point. Then it finds the intermediate point that is furthest away from the straight line and deems this the "most important" and splits the polyline into two halves at that point. This process is repeated on both halves until the distance of the intermediate point is below a certain threshold, after which all points on that sub-polyline are thrown away since they have a negligible impact on the overall shape.

The Visvalingam algorithm works from the inside-out. It starts by computing the area of the triangle formed by each consecutive three points along the polyline. Then the midpoint of the triangle with the least area is thrown out since those three points are the closest to colinear and the area of triangles on either side are recomputed. The process

@veltman
veltman / index.html
Last active January 1, 2018 19:42
For creating an approval matrix/magic quadrant viz in d3.
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.grid {
stroke-width: 0.5px;
stroke: steelblue;
fill: none;
opacity: 0.5;
}