Browse Source

Merge remote branch 'github/master'

master
Jonathan "Duke" Leto 13 years ago
parent
commit
222e94495e
  1. 11
      bin/change_git_to_ssh_protocol
  2. 21
      bin/kml_dump.pl
  3. 5
      bin/shadow_config
  4. 10
      bin/update_sites
  5. 4
      config/.gitconfig
  6. 1
      config/.gvimrc
  7. 4
      config/.vimperatorrc

11
bin/change_git_to_ssh_protocol

@ -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;
}

21
bin/kml_dump.pl

@ -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";
}

5
bin/shadow_config

@ -25,8 +25,9 @@ my $dir = shift || '/home/leto/git/util';
die "$dir does not exist!" unless -e $dir;
sub run {
print "$_\n";
system $_;
my ($cmd) = @_;
print "$cmd\n";
system $cmd;
}
for my $config (@config_files) {

10
bin/update_sites

@ -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

4
config/.gitconfig

@ -20,12 +20,14 @@
flog = reflog
sha1 = rev-parse
pr = pull --rebase
f = fetch
r = remote
pus = push
pu = push
p = push
lazyrebase = !git stash && git pull --rebase && git stash pop
unmerged = branch --no-merged
[core]
excludesfile = ~/.gitignore
editor = vim

1
config/.gvimrc

@ -0,0 +1 @@
colorscheme desert

4
config/.vimperatorrc

@ -3,7 +3,9 @@
" Make duckduckgo the default search engine
" This requires the DDG search engine to already be installed
" in your browser
set defsearch="duck"
set defsearch="duckduckgo"
"set toolbars=noaddons,nobookmarks,nomenu,navigation,tabs
" Autocomplete using Firefox Awesomebar subsystem
set complete=l

Loading…
Cancel
Save