Skip to content

Instantly share code, notes, and snippets.

@Fil
Fil / recolle.php
Last active August 29, 2015 14:10
make a large png from map tiles
<?php
# stitch tile images together to form a large image
# see also https://github.com/ericfischer/tile-stitch
function usage($err= null) {
echo "php recolle.php 'http://TILES_SERVER/%z/%x/%y.png' z x1 y1 [+nx] [+ny]\n";
if ($err)
@Cerdic
Cerdic / cherry-pick.php
Last active December 16, 2015 22:39
Mon cherry-pick pour svn
#!/usr/bin/php
<?php
// Report d'un commit d'un repertoire sur un autre
// le script fait le merge svn et prepare le log de comit dans log.txt
// mais ne fait pas le commit automatiquement car risque de conflits
// il faut le faire suivre de la commande comit manuelle si le diff est OK
// Syntaxe :
// cherry-pick.php -rNNNN source dest
//
// exemple d'utilisation :
L.Wax = L.Class.extend({
initialize: function (map) {
this.map = map;
var layers = map.options.layers || [];
var wax = false;
var self = this;
map.on('layeradd', function(e) {
if (e.layer.options.wax) {
@tecoholic
tecoholic / osm2geo.js
Created November 27, 2011 04:57
OSM2GEO - A JS Converter to convert OSM to GeoJSON
/**************************************************************************
* OSM2GEO - OSM to GeoJSON converter
* OSM to GeoJSON converter takes in a .osm XML file as input and produces
* corresponding GeoJSON object.
*
* AUTHOR: P.Arunmozhi <[email protected]>
* DATE : 26 / Nov / 2011
* LICENSE : WTFPL - Do What The Fuck You Want To Public License
* LICENSE URL: http://sam.zoy.org/wtfpl/
*