Skip to content

Instantly share code, notes, and snippets.

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

Jeffrey Morgan jeffreymorganio

💭
👨🏻‍💻
View GitHub Profile
@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 / 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
Created May 6, 2017 15:13
Click to center a Leaflet JS map marker
license: mit
@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 / .block
Last active June 18, 2016 09:02
Toggling LeafletJS Layer Groups with Custom Controls.
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 / .block
Created June 12, 2016 14:50
A D3 Bar Chart of SVG Rectangles.
license: mit
@jeffreymorganio
jeffreymorganio / .block
Last active June 12, 2016 14:47
A D3 Bar Chart of DIV Elements.
license: mit
@jeffreymorganio
jeffreymorganio / .block
Last active June 12, 2016 09:42
A marker on a Google map.
license: mit