= Dot Files =
Configuration and scripts for productivity.
== Usage ==
Clone git repo. Copy or create links to files as necessary.
=== Local overrides ===
= Dot Files =
Configuration and scripts for productivity.
== Usage ==
Clone git repo. Copy or create links to files as necessary.
=== Local overrides ===
| <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
| <html xmlns="http://www.w3.org/1999/xhtml"> | |
| <head> | |
| <title>Intro to XS/C++</title> | |
| <!-- metadata --> | |
| <meta name="generator" content="S5" /> | |
| <meta name="version" content="S5 1.2a2" /> | |
| <meta name="author" content="Doug Bell" /> | |
| <meta name="company" content="Double Cluepon Software Corp." /> |
| #!/usr/bin/env perl | |
| # Pretty-print JSON file | |
| use JSON; | |
| my @files = @ARGV; | |
| my @fh; | |
| if ( !@files ) { | |
| @fh = ( *STDIN ); | |
| } |
| ps au | perl -anle'print $F[1] if $F[10] eq "sleep"' | xargs kill |
| #!/bin/sh | |
| # A basic plackup script | |
| NAME=RT | |
| PLACKUP=rt-server | |
| USER=rt | |
| PID_FILE=/tmp/rt-server.pid | |
| case $1 in | |
| start) |
| # Set the right PERL5LIB | |
| for LIBDIR in $HOME/git/*; do | |
| if [[ -e $LIBDIR/blib/lib ]]; then | |
| PERL5LIB=$LIBDIR/blib/lib:$LIBDIR/blib/arch:$PERL5LIB | |
| fi | |
| # lib dir outranks blib dir, though this might cause problems with XS modules | |
| if [[ -e $LIBDIR/lib ]]; then | |
| PERL5LIB=$LIBDIR/lib:$PERL5LIB | |
| fi | |
| done |
| sub de_pbp($) { | |
| my ( $class ) = @_; | |
| my $meta = $class->meta; | |
| for my $attr_name ( $meta->get_attribute_list ) { | |
| my $attr = $meta->get_attribute( $attr_name ); | |
| next if $class->can( $attr_name ); # Don't overwrite something already here | |
| if ( $attr->reader eq "get_$attr_name" && $attr->writer eq "set_$attr_name" ) { | |
| # Also install the non-PBP version | |
| # Have to use globref because we're immutable... | |
| no strict 'refs'; |
| sub method_ref { | |
| my ( $self, $method_name, @args ) = @_; | |
| return sub { $self->$method_name( @args, @_ ); } | |
| } |
| package CleanupDir; | |
| use Moose; | |
| with 'MooseX::Getopt'; | |
| with 'MooseX::Runnable'; | |
| use File::Find; | |
| use File::stat; | |
| use autodie qw( :system ); | |
| use Log::Log4perl qw( :easy ); |
| # digest.sh | |
| # Create an e-mail digest of all output, STDOUT and STDERR, and send it | |
| # when given the proper command. | |
| # Usage: | |
| # digest.sh add <job_name> <command> | |
| # # Send an e-mail and reset the digest | |
| # digest.sh send <job_name> | |
| # Environment: | |
| # DIGEST_DIR: The directory to store digests in | |
| # MAILTO: The e-mail to send digests to |