This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wget -A pdf,jpg -m -p -E -k -K -np http://site/path/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set-option -g mouse on |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function stripComments(ymltext) { | |
const lines = ymltext.split(/\r?\n/).map(line => { | |
const trim = line.trim(); | |
return trim[0]!=='#' ? line : ''; | |
}).filter(line => { | |
return line; | |
}); | |
return lines.join('\n')+'\n'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function availableRoutes() { | |
return app._router.stack | |
.filter(r => r.route) | |
.map(r => { | |
return { | |
method: Object.keys(r.route.methods)[0], | |
path: r.route.path | |
}; | |
}); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function filesize(bytes) { | |
if (bytes === 0) return bytes; | |
var sizes = ['Bytes','KB','MB','GB','TB'], | |
i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); | |
return Math.round(bytes / Math.pow(1024, i), 1) + ' ' + sizes[i]; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getBoundingBox(data) { | |
var bounds = {}, coordinates, point, latitude, longitude; | |
// Loop through each "feature" | |
for (var i = 0; i < data.features.length; i++) { | |
coordinates = data.features[i].geometry.coordinates; | |
if(coordinates.length === 1){ | |
// It's only a single Polygon | |
// For each individual coordinate in this feature's coordinates... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//require https://github.com/w8r/Leaflet.Path.Drag | |
var imagePoly = [ | |
imageBounds.getNorthEast(), | |
imageBounds.getNorthWest(), | |
imageBounds.getSouthWest(), | |
imageBounds.getSouthEast() | |
]; | |
var poly = new L.Polygon([imagePoly], { | |
//draggable:true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
ob_start(); | |
if(isset($argv[1])) | |
$outfile = $argv[1]; | |
else | |
$outfile = 'index.html'; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.