Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View absolutelynotjames's full-sized avatar

James Myers absolutelynotjames

  • Durham College
  • Greater Toronto Area
View GitHub Profile
var maxHeight = 0;
var widget = $(".widget > div");
widget.each(function(){
if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
});
widget.height(maxHeight);
@absolutelynotjames
absolutelynotjames / wp-cli-export-tribe-events-cat
Created August 10, 2018 18:32
WP CLI export single events calendar category
wp export --post__in="$(wp post list --post_type=foo --tribe_events_cat=bar --format=ids)"
@absolutelynotjames
absolutelynotjames / leaflet-multi-geojson-layers.js
Last active March 31, 2016 00:45 — forked from pospi/leaflet-multi-geojson-layers.js
Handle multiple geoJSON layers in a Leaflet.js angular directive. Original code by @pospi, slightly modified to support the pointToLayer option.
/**
* Service to manage geoJSON layering with Leaflet.js' angular directive, which only allows 1 set of geoJSON data.
*
* Assuming you have a leaflet directive with its 'geojson' attribute set to `geojson`, usage is as follows:
* var layers = new GeoJSONLayers();
*
* layers.addLayer('myLayer', geoJSON, function(feature) { return { fillColor: '#00F' }; });
* $scope.geojson = layers.get();
*
* layers.removeLayer('myLayer');