45 Tools to Boost Your Front-End
About
By: Nicolas PENNEC
Talk: BreizhCamp 2015
Slides: http://fr.slideshare.net/NicoPennec/45-toolstoboostyourfrontend
// gmaps js api v2 polygon overlays -> geojson | |
overlayToGeoJSON = function(o){ | |
var feature={type:'Feature', geometry:{ type:'Polygon', coordinates:[[]]}}; | |
for (var i=0; i < o.latlngs.length; i++){ | |
feature.geometry.coordinates[0].push([o.latlngs[i].lng + o.reflng, o.latlngs[i].lat + o.reflat]) | |
} | |
feature.properties = {hint:o.hint, html: o.infohtml} | |
return feature; | |
} | |
var results={type: "FeatureCollection", features: []}; |
# These are shell functions to quickly create pansharpened RGB images ready for color correction | |
# from a set of raw Landsat 8 TIF files in a given directory. | |
# For example: | |
# l8_pansharp LC81690352014169LGN00 | |
# Creates: | |
# LC81690352014169LGN00_rgb_pansharp.tif | |
# l8_rush_pansharp downloads a L8 tile from Google Storage (if they have it), extracts the relevant bands, then creates the pansharpened output. |
-- Open These views with QGIS | |
-- You can label the ticks view with this expression : "CASE WHEN m % 5 = 0 THEN h END" to get hour numbers | |
-- Set categorized styles on typ and unit to set different styles for dials, and for the hands | |
-- Please tweet your best clock designs with #PostGISClock hashtag | |
create or replace view ticks as | |
select | |
m as id | |
, case when m % 5 = 0 then 'h' else 'm' end as typ | |
, m % 5 as h |
psql DBNAME -c "\\copy (SELECT ST_AsGeoJson(ST_Union(the_geom)) AS the_geom, attribute2, attribute3 FROM TABLENAME) to '/PATH/TO/YOUR/DESIRED/FILE.geojson'" |
const fun = ({param1 = 'some default value', param2 = 'other default value'} = {}) => { | |
console.log(param1); | |
console.log(param2); | |
console.log(options); // Can I somehow get access to the object that has param1 and param2 inside? | |
console.log(arguments[0]); // Is this the only way? | |
}; |
By: Nicolas PENNEC
Talk: BreizhCamp 2015
Slides: http://fr.slideshare.net/NicoPennec/45-toolstoboostyourfrontend
# -*- coding: utf-8 -*- | |
"""QGIS QgsPalLabeling examples | |
.. note:: This program is free software; you can redistribute it and/or modify | |
it under the terms of the GNU General Public License as published by | |
the Free Software Foundation; either version 2 of the License, or | |
(at your option) any later version. | |
""" | |
__author__ = 'Larry Shaffer' | |
__date__ = '10/14/2013' |
# Making maps with reduce() | |
from matplotlib import pyplot | |
from descartes import PolygonPatch | |
from fiona import collection | |
BLUE = '#6699cc' | |
def render(axes, rec): | |
"""Given matplotlib axes and a record, adds the record as a patch |