Jonathan "Duke" Leto
13 years ago
7 changed files with 52 additions and 4 deletions
@ -0,0 +1,11 @@ |
|||
#!/usr/bin/env perl |
|||
|
|||
# convert a git:// protocol string to an ssh protocol string |
|||
# very useful in visual select mode from vim |
|||
|
|||
use Modern::Perl; |
|||
|
|||
while(my $line = <>){ |
|||
$line =~ s!git://([^/]+)/!git\@$1:!g; |
|||
print $line; |
|||
} |
@ -0,0 +1,21 @@ |
|||
#!/usr/bin/env perl |
|||
|
|||
use strict; |
|||
use warnings; |
|||
use Geo::KML; |
|||
use Data::Dumper; |
|||
|
|||
# This file will dump markers from a KML 2.2 file as CSV in Name, Lat, Lng format |
|||
|
|||
my $file = shift || die "Usage: $0 file.kml > file.csv"; |
|||
my $data = Geo::KML->readKML($file); |
|||
|
|||
$Data::Dumper::Indent = 1; |
|||
my $places = $data->{Document}->{AbstractFeatureGroup}; |
|||
for my $place ( @$places) { |
|||
my $placemark = $place->{Placemark}; |
|||
# warn Dumper $placemark; |
|||
my ($lat,$long) = split /,/, $placemark->{Point}->{coordinates}->[0]; |
|||
my $name = $placemark->{name}; |
|||
print "$name, $lat, $long\n"; |
|||
} |
@ -0,0 +1,10 @@ |
|||
#!/bin/sh |
|||
|
|||
PATH=/home/leto/bin:/bin:/usr/bin:/usr/local/bin |
|||
DIR=/sites |
|||
|
|||
for i in `ls /sites/`; do |
|||
# we don't care about STDOUT, but let STDERR escape (which will generate email if used in cron) |
|||
cd $DIR/$i/htdocs && git fetch --all --prune > /dev/null && git rebase origin/master > /dev/null |
|||
done |
|||
|
@ -0,0 +1 @@ |
|||
colorscheme desert |
Loading…
Reference in new issue