Skip to content

Instantly share code, notes, and snippets.

View max-mapper's full-sized avatar
🔰
✌( ͡ᵔ ͜ʖ ͡ᵔ )✌

Max max-mapper

🔰
✌( ͡ᵔ ͜ʖ ͡ᵔ )✌
View GitHub Profile
@max-mapper
max-mapper / bibtex.png
Last active November 19, 2025 13:01
How to make a scientific looking PDF from markdown (with bibliography)
bibtex.png
@max-mapper
max-mapper / epaurls.txt
Created April 24, 2017 16:42
epa edg metadata
This file has been truncated, but you can view the full file.
639 "https://www.epa.gov/enviroatlas/enviroatlas-data"
276 "https://enviroatlas.epa.gov/arcgis/rest/services"
194 "https://enviroatlas.epa.gov/arcgis/rest/services/Communities"
142 "https://edg.epa.gov/metadata/"
118 "https://www3.epa.gov/enviro/html/fii/downloads/state_files/Facility%20State%20File%20Documentation.pdf"
54 "http://www.epa.gov/geospatial/"
41 "https://edg.epa.gov/clipship/"
34 "https://epa.maps.arcgis.com/home/webmap/viewer.html?&url=https%3A%2F%2Fenviroatlas.epa.gov%2Farcgis%2Frest%2Fservices%2FSupplemental%2FConnectivity_AllCommunities%2FMapServer"
34 "https://enviroatlas.epa.gov/arcgis/rest/services/Supplemental/Connectivity_AllCommunities/MapServer/kml/mapImage.kmz"
34 "https://enviroatlas.epa.gov/arcgis/rest/services/Supplemental/Connectivity_AllCommunities/MapServer?f=nmf"
@max-mapper
max-mapper / index.js
Created April 18, 2017 23:25
imessage sqlite export
// modified version of http://va2577.github.io/post/51/ to produce ndjson
const sqlite3 = require('sqlite3').verbose();
const db = new sqlite3.Database('../imessage.sqlite')
const Iconv = require('iconv').Iconv;
const sjis = new Iconv('UTF-8', 'Shift_JIS//TRANSLIT//IGNORE');
const filename = './sms.csv';
db.serialize(() => {
const sql = [];
@max-mapper
max-mapper / readme.md
Created April 10, 2017 20:52
data.gov web mirror

proposal 1

CKAN mirror

deploy a full fledged ckan mirror as a live database backed web service and load it up with all the data.gov metadata

pros

  • could mirror the data.gov functionality completely, including all the rendered views
  • brings the full ckan feature set including search and user accounts and plugins
@max-mapper
max-mapper / index.js
Last active March 14, 2017 22:30
read multicast packets from node
var socket = dgram.createSocket({ type: 'udp4', reuseAddr: true })
socket.bind(5004, function () {
socket.addMembership('239.255.42.42', getIpForInterface('en2'))
socket.setMulticastTTL(255)
})
socket.on('message', function (m) {
// m is a buffer
})
@max-mapper
max-mapper / readme.md
Created March 10, 2017 00:03
DIY DAT DYNDNS

for ubuntu, to set up a dynamic dns service that tells you what the external ip of some machine is

  • npm install dat lil-pids run-every add-to-systemd -g
  • mkdir ipdat; cd ipdat; dat create; cd ..;
  • edit file services with this:
cd ipdat && dat sync
cd ipdat && run-every 3600 curl ipinfo.io/ip > ip.txt
@max-mapper
max-mapper / ftp-servers.txt
Last active November 2, 2024 22:02
The 323 HTTP + FTP domains hosting Data.gov data, listed by number of datasets
901441 "rockyftp.cr.usgs.gov"
259 "ghrc.nsstc.nasa.gov"
185 "acdisc.gsfc.nasa.gov"
158 "ftp2.census.gov"
119 "podaac-ftp.jpl.nasa.gov"
73 "gpm.nsstc.nasa.gov"
71 "airbornescience.nsstc.nasa.gov"
65 "hydro1.sci.gsfc.nasa.gov"
56 "ftp.nhtsa.dot.gov"
53 "measures.gsfc.nasa.gov"
@max-mapper
max-mapper / index.sh
Created March 3, 2017 18:16
datarefugerefuge
#!/bin/sh
mkdir bags
nugget "https://www.datarefuge.org/api/3/action/package_search?rows=1000" -o datarefuge.json
cat datarefuge.json | jsonfilter result.results.*.resources.*.url | grep bag | xargs nugget -c -d bags
@max-mapper
max-mapper / readme.md
Last active February 28, 2017 21:28
opendataphilly metadata stats
~/Desktop 🐈  cat results-opendataphilly.json | jsonfilter url | awk -F/ '{print $1}' | sort | uniq -c | sort -rn
1183 "http:
466 "https:
36 "ftp:

~/Desktop 🐈  cat results-opendataphilly.json | jsonfilter status | sort | uniq -c | sort -rn
1575 200
  35 404
  10 500
@max-mapper
max-mapper / datagovmetadata.json
Created February 14, 2017 21:54
EOP-GOV Metadata
{"help": "https://catalog.data.gov/api/3/action/help_show?name=package_search", "success": true, "result": {"count": 48, "sort": "views_recent desc", "facets": {}, "results": [{"license_title": "License not specified", "maintainer": "New Media", "relationships_as_object": [], "private": false, "maintainer_email": "newmedia@whitehouse.gov", "num_tags": 5, "id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "metadata_created": "2016-07-02T10:06:26.199575", "metadata_modified": "2016-07-02T10:06:26.199575", "author": null, "author_email": null, "state": "active", "version": null, "creator_user_id": "47303a9e-1187-4290-85a3-1fc02dc49e4a", "type": "dataset", "resources": [{"cache_last_updated": null, "package_id": "59694770-b6b6-4ae0-a4b9-4ae69c0be2f6", "webstore_last_updated": null, "id": "3a8a0ad1-19e7-4153-bb2f-d70cf88aaaf8", "size": null, "state": "active", "hash": "", "description": "", "format": "CSV", "tracking_summary": {"total": 32, "recent": 1}, "last_modified": null, "url_type": null, "no_real_name": "True",