Skip to content

Instantly share code, notes, and snippets.

View ndkv's full-sized avatar

Simeon Nedkov ndkv

View GitHub Profile
@ndkv
ndkv / video.html
Last active March 18, 2022 09:35
Mux API test
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="https://unpkg.com/@mux/upchunk@2"></script>
</head>
<body>
<h1>mux</h1>
0x5159d8C3BE83C21530F4AC43451e326B8FF5bbB0

Keybase proof

I hereby claim:

  • I am ndkv on github.
  • I am simeonnedkov (https://keybase.io/simeonnedkov) on keybase.
  • I have a public key whose fingerprint is D761 BBAA 74B6 117E A84E E8D1 5134 803F E957 04A2

To claim this, I am signing this object:

@ndkv
ndkv / README.md
Created September 6, 2016 08:33
No name

README is empty

@ndkv
ndkv / gist:42c622641715991d6b2f
Last active September 16, 2015 12:30
Example of Best Practice documentation for SDWWG

Better Living Through Documentation

http://datamade.us/blog/better-living-through-documentation/

A thorough list of recommendations on how to write developer-friendly documentation (and best practices). Contains many useful tips e.g. "don't put important content directly before or after a code snippet", "avoid the word 'just'" and "make sure code examples are okay to copy/paste".

OpenLayers 3 examples

http://openlayers.org/en/v3.8.2/examples/cluster.html

Executes the "easy copy/paste of code" mantra extremely well. Code is copied to clipboard or JSFiddle with a single click. The latter is extremely useful for doing quick, one-off experiments.

@ndkv
ndkv / index.html
Last active July 7, 2023 12:36
PDOK docs Quickstart Leaflet
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script>
<link rel="stylesheet" href="https://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<script src="https://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<style>
...
<bldg:RoofSurface gml:id="fme-gen-bb94ffb9-b527-40ab-831f-93bf55071592">
<bldg:lod2MultiSurface>
<gml:MultiSurface srsName="EPSG:28992" srsDimension="3">
<gml:surfaceMember>
<gml:Polygon xmlns:gml="http://www.opengis.net/gml" gml:id="b3f63b67-bdc4-4202-9810-663de5cf533f">
<gml:exterior>
<gml:LinearRing gml:id="08fbbfb8-42f9-4572-994e-2d07d9aaf036">
<gml:posList>92452.963 434789.813 2.722461404 92452.855 434790.144 2.601263894 92448.674 434788.776 2.60126399 92449.012 434787.819 2.954226095 92453.171 434789.18 2.954230621 92452.963 434789.813 2.722461404</gml:posList>
@ndkv
ndkv / raster.py
Last active December 24, 2015 02:29
Extract a raster as GeoTIFF from PostGIS 2 ht @bmmeijers
import psycopg2
conn_string = "host='' dbname='' user='' password=''"
conn = psycopg2.connect(conn_string)
cursor = conn.cursor()
cursor.execute("SELECT ST_AsTIFF(rast, 'JPEG90') as img FROM sq_rast WHERE rid=1;")
rast = cursor.fetchone()
with open('raster.tiff', 'wb') as f_out:
@ndkv
ndkv / map.geojson
Created August 14, 2013 11:20
via:geojson.io
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ndkv
ndkv / index.html
Last active December 15, 2015 15:29
AHN alternative coloring
<html lang="en">
<head>
<meta charset="utf-8" />
<title>OpenLayers WMS example</title>
<script type="text/javascript" src="http://waalweelde.ndkv.nl/lib/OpenLayers-2.12/OpenLayers.js"></script>
<script type="text/javascript">
function init() {
var map = new OpenLayers.Map('map', {
maxExtent: new OpenLayers.Bounds(10000.0, 305000.0, 280000.0, 619000.0),
projection: new OpenLayers.Projection("EPSG:28992")