Skip to content

Instantly share code, notes, and snippets.

@scottw
scottw / brew-depends-on.pl
Created January 26, 2018 22:39
Script to see what casks depend on other casks (the inverse of 'brew deps')
#!/usr/bin/env perl
use strict;
use warnings;
use feature 'say';
my %deps = map { $_ => [] } map { chomp; $_ } `brew list`;
for my $cask (sort keys %deps) {
print STDERR "\r\e[2KInspecting cask: '$cask'";
@scottw
scottw / hydrate.pl
Created July 9, 2018 13:56
An example of a no-dependency template in Perl
#!/usr/bin/env perl
use strict;
use warnings;
# hydrate: poor man's templating
#
# usage: hydrate key1=value1 key2=value2 ... path/to/file.in > path/to/file.out
#
# substitutes all strings '{{key1}}' in file.in with 'value1'