Skip to content

Instantly share code, notes, and snippets.

View ap's full-sized avatar

Aristotle Pagaltzis ap

View GitHub Profile
@ap
ap / foo.pl
Last active May 11, 2017 21:21 — forked from anonymous/foo.pl
use v5.10;
use re 'eval';
my @a = (
[ 'aaa', sub { say 'Apple' } ],
[ 'bbb', sub { say 'Banana' } ],
[ 'ccc', sub { say 'Carrot' } ],
);
my @r = map {
@ap
ap / license
Created January 27, 2010 11:22 — forked from defunkt/license
#!/bin/bash
# Usage: license [fullname]
# Prints an MIT license appropriate for totin' around.
#
# $ license > COPYING
# $ license 'Joe Random' > COPYING
#!/bin/sh
FULLNAME=${1:-$(getent passwd $(id -u) | cut -d: -f5 | cut -d, -f1)}
cat << "."
Copyright (c) `date +%Y` $FULLNAME