A Pen by Lorenzo Brutti on CodePen.
This file contains hidden or 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
// custom mapbopx-gl-draw mode that modifies draw_line_string | |
// shows a center point, radius line, and circle polygon while drawing | |
// forces draw.create on creation of second vertex | |
import MapboxDraw from 'mapbox-gl-draw'; | |
import numeral from 'numeral'; | |
import lineDistance from 'npm:@turf/line-distance'; | |
const RadiusMode = MapboxDraw.modes.draw_line_string; |
This file contains hidden or 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/perl | |
# Requirements: Device::SerialPort 0.12 (from cpan) | |
# | |
# Description: This perl script is for logging of data from a serial | |
# port, to a specified logfile. The logfile can then be parsed with | |
# other programs for reporting purposes. | |
# | |
# EXAMPLE: | |
# perl -w serlog.pl test .log /dev/ttyS0 9600 | |
# |
This file contains hidden or 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
<?php | |
if (count($argv) == 0) { | |
exit; | |
} | |
$xsltPath = $argv[1]; | |
$xmlPath = $argv[2]; | |
// $outputPath = $argv[3]; | |
$xslt = file_get_contents($xsltPath); | |
$xml = file_get_contents($xmlPath); |
This file contains hidden or 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
//depends on lodash | |
var momentHolidays = {}; | |
_.map(googleRes.items, function(o) { | |
momentHolidays[o.summary] = { | |
'date': (o.start.date.split("-")[1] + '/' + o.start.date.split("-")[2]) | |
}; | |
}); |