Skip to content

Instantly share code, notes, and snippets.

View sebastian-ch's full-sized avatar
😎

Sebastian Hancock sebastian-ch

😎
View GitHub Profile
@armollica
armollica / .block
Last active September 9, 2021 13:25
Shaded Relief Map
height: 1000
@marteinn
marteinn / info.md
Last active January 21, 2024 06:57
Using the Fetch Api with Django Rest Framework

Using the Fetch Api with Django Rest Framework

Server

First, make sure you use the SessionAuthentication in Django. Put this in your settings.py

# Django rest framework
REST_FRAMEWORK = {
    'DEFAULT_AUTHENTICATION_CLASSES': [
 'rest_framework.authentication.SessionAuthentication'
@rclark
rclark / L.TopoJSON.js
Last active December 7, 2022 00:23
TopoJSON-aware Leaflet layer
/*
You'll need something like this in your HTML:
<script src="http://d3js.org/topojson.v1.min.js"></script>
*/
L.TopoJSON = L.GeoJSON.extend({
addData: function(jsonData) {
if (jsonData.type === "Topology") {
for (key in jsonData.objects) {
geojson = topojson.feature(jsonData, jsonData.objects[key]);
@waldoj
waldoj / va-transportation-feeds.txt
Created February 28, 2013 03:28
GeoJSON files for real-time Virginia transportation data.
These are the data sources that drive the 511virginia.org mapping site.
http://www.511virginia.org/data/icons.cameras_inactive.geojson
http://www.511virginia.org/data/geojson/icons.inactive_construction.geojson
http://www.511virginia.org/data/icons.cameras.geojson
http://www.511virginia.org/data/geojson/icons.ord_dms_active.geojson
http://www.511virginia.org/data/geojson/icons.scheduled_bridge_opening.geojson
http://www.511virginia.org/data/geojson/icons.construction.geojson
http://www.511virginia.org/data/geojson/icons.incident.geojson
http://www.511virginia.org/data/geojson/icons.weather.geojson