Skip to content

Instantly share code, notes, and snippets.

Avatar

James Myers absolutelynotjames

  • Durham College
  • Greater Toronto Area
View GitHub Profile
View That's the Spirit.markdown
@absolutelynotjames
absolutelynotjames / leaflet-multi-geojson-layers.js
Last active Mar 31, 2016 — 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.
View leaflet-multi-geojson-layers.js
/**
* 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');
@absolutelynotjames
absolutelynotjames / wp-cli-export-tribe-events-cat
Created Aug 10, 2018
WP CLI export single events calendar category
View wp-cli-export-tribe-events-cat
wp export --post__in="$(wp post list --post_type=foo --tribe_events_cat=bar --format=ids)"
View Siteorigin widget equalizer
var maxHeight = 0;
var widget = $(".widget > div");
widget.each(function(){
if ($(this).height() > maxHeight) { maxHeight = $(this).height(); }
});
widget.height(maxHeight);
You can’t perform that action at this time.