Skip to content

Instantly share code, notes, and snippets.

View hotchpotch's full-sized avatar
🏠
Working from home

Yuichi Tateno (secon) hotchpotch

🏠
Working from home
View GitHub Profile
@miyagawa
miyagawa / gitweb.psgi
Created March 27, 2010 13:54
Running gitweb.cgi on Plack
# 1. Download git and make gitweb/gitweb.cgi (See gitweb/INSTALL how to set gitweb root etc.)
# 2. Copy this file as gitweb/app.psgi
# 3. cd gitweb; plackup
# 4. Access http://localhost:3000/gitweb.cgi
use Plack::Builder;
use Plack::App::WrapCGI;
use Plack::App::File;
builder {
#!/usr/bin/perl
use strict;
use warnings;
use List::MoreUtils qw(any);
sub git;
chdir git('rev-parse --git-dir') . '/..';
my @submodules = map [split /\s+/]->[-1], grep /^160000 /, git 'ls-files --stage';