Skip to content

Instantly share code, notes, and snippets.

View jeffreymorganio's full-sized avatar
💭
👨🏻‍💻

Jeffrey Morgan jeffreymorganio

💭
👨🏻‍💻
View GitHub Profile
@jeffreymorganio
jeffreymorganio / centerLeafletMapOnMarker.js
Created July 5, 2016 15:40
Zoom and center a Leaflet map on a single marker.
function centerLeafletMapOnMarker(map, marker) {
var latLngs = [ marker.getLatLng() ];
var markerBounds = L.latLngBounds(latLngs);
map.fitBounds(markerBounds);
}
@jeffreymorganio
jeffreymorganio / .block
Created June 14, 2016 07:17
Plotting CSV Map Marker Data.
license: mit
@jeffreymorganio
jeffreymorganio / super.js
Created July 3, 2021 08:18 — forked from deanmcpherson/super.js
super quick and dirty code embed support
//<script>
function clearBlock(el) {
const node = el.parentElement.parentElement;
node.innerHTML = '';
return node;
}
const SELECTOR = 'code:not([super-embed-seen])';
function setupEmbeds() {
@jeffreymorganio
jeffreymorganio / uk-bounding-box.geojson
Created October 6, 2015 08:53
Longitude and latitude bounding box around the UK
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeffreymorganio
jeffreymorganio / .block
Created May 6, 2017 15:13
Click to center a Leaflet JS map marker
license: mit
@jeffreymorganio
jeffreymorganio / javascript-array-of-random-values.js
Created June 12, 2016 15:01
Create and fill a JavaScript array with random values.
function randomDataSet(dataSetSize, minValue, maxValue) {
return new Array(dataSetSize).fill(0).map(function(n) {
return Math.random() * (maxValue - minValue) + minValue;
});
}
@jeffreymorganio
jeffreymorganio / world-bounding-box.geojson
Created October 6, 2015 08:55
Longitude and latitude bounding box around the world
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jeffreymorganio
jeffreymorganio / clear-recently-used-files.sh
Created August 26, 2018 17:03
Clear recently used files on Ubuntu
rm ~/.local/share/recently-used.xbel
@jeffreymorganio
jeffreymorganio / .block
Last active June 18, 2016 09:02
Toggling LeafletJS Layer Groups with Custom Controls.
license: mit
@jeffreymorganio
jeffreymorganio / .block
Last active June 14, 2016 07:03
A marker on a Leaflet JS map.
license: mit