Skip to content

Instantly share code, notes, and snippets.

View briandfoy's full-sized avatar

brian d foy briandfoy

View GitHub Profile
@briandfoy
briandfoy / grab-gist
Last active February 12, 2025 22:00
A Mojo::UserAgent program to grab all the files in a gist
#!/usr/bin/perl
=encoding utf8;
=head1 NAME
grab-gist - download all the files in a gist
=head1 SYNOPSIS
<html>
<head>
<title>Selector example</title>
</head>
<body>
<a href="https://stackoverflow.com/a/76537358/2766176">https://stackoverflow.com/a/76537358/2766176</a>
<div>
@briandfoy
briandfoy / make_pull_request_feed.pl
Created June 27, 2023 11:40
Make an Atom feed for pull requests to a GitHub repo
#!/Users/brian/bin/perl
use v5.36;
use open qw(:std :utf8);
use Mojo::UserAgent;
my $ua = Mojo::UserAgent->new;
my( $user, $repo ) = split m|/|, $ARGV[0];
my $url = $ARGV[1];
@briandfoy
briandfoy / rt_cpan_org_export
Created July 14, 2023 08:03
rt_cpan_org_export - a program to export an rt.cpan.org queue to JSON
use v5.26;
use warnings;
=encoding utf8
=head1 NAME
rt_cpan_org_export - grab the tickets for an rt.cpan.org queue
=head1 SYNOPSIS
@briandfoy
briandfoy / net-ssh-perl-rt2github.pl
Created January 14, 2024 19:11
Import rt.cpan.org issues to GitHub issues
use v5.26;
use open qw(:std :utf8);
use Mojo::JSON qw(decode_json);
use Mojo::UserAgent;
use Mojo::Util qw(dumper);
# See another gist to create JSON https://gist.github.com/briandfoy/656a8986e2d998122e37486df1f1f999
@ARGV = '/Users/brian/Desktop/net-ssh-perl-rt.json';
my $raw = Mojo::File->new($ARGV[0])->slurp;