adet
attempts to provide maximum DWIM for projects using docker, Docker
Compose and AWS ECS from YAML configuration files. It supports the three
projects I'm working on nicely, each one of which has several component
Docker images organized into tasks and services, and deployed on ECS.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use strict; use warnings; | |
use List::Util qw(reduce); | |
use File::Slurp qw(read_file); | |
# Given a list of filenames, return a hash of each word and the number of times | |
# it occurs. | |
sub word_count { | |
reduce { $a->{$b}++; $a } {}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package FixEncodings; | |
use strict; | |
use warnings; | |
require Exporter; | |
our @ISA = qw(Exporter); | |
our @EXPORT_OK = qw(explain attempt_decode); | |
# This should be in terms of longest first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
# Draw the commit graph of a git repository, using GraphViz. Supply the directory | |
# the repo is in as the first argument. Writes a file called 'repo.svg' to the CWD. | |
use strict; use warnings; | |
use Cwd; | |
use Git::PurePerl; | |
use GraphViz2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
# Display a bubble chart of DB tables, with rows and relationships to other tables | |
# Either run directly: perl bubble.pl | |
# Or with Plack: plackup bubble.pl | |
use strict; use warnings; | |
# cpanm Dancer Template DBIx::Class::Schema::Loader Data::Google::Visualization::DataTable | |
use Dancer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# `wrong` in Perl. https://github.com/sconover/wrong | |
# | |
# | |
=head1 SYNOPSIS | |
#!perl | |
use strict; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package Sudoku; | |
1; | |
package Sudoku::Grid { | |
use strict; | |
use warnings; | |
use Cell; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/(?:3(?:7(?:5[0-9]|6[0-7]|2[02-8]|3[0235-9]|1[1-5789]|8[1235-9]|0[0145789]|9[1235679]|4[014679]|7[05789])|5(?:5[0124-9]|8[013-689]|6[1-8]|7[0-3569]|2[0-3579]|0[0125679]|9[014-79]|4[02469]|1[25-8]|3[0137])|3(?:5[0-7]|3[0-578]|1[01245789]|7[01345789]|0[0-59]|2[1-589]|9[0-356]|8[014578]|4[0125]|6[0134])|8(?:5[0-46-9]|0[02-9]|9[0-3568]|1[02-68]|8[025-9]|2[0-5]|7[013458]|4[01247]|6[02459]|3[1235])|0(?:[245][0-9]|6[0-8]|7[0-689]|3[0-46-9]|1[0-35689]|9[013-79]|8[1-5789]|0[0-468])|6(?:3[0-9]|6[0-69]|7[0-35-8]|4[0134679]|9[0145789]|1[0246-9]|2[0-49]|8[235789]|0[78]|5[89])|4(?:6[0-5789]|3[0-578]|4[0124678]|8[0235789]|2[034789]|1[2-589]|0[01279]|9[01468]|5[0138]|7[2578])|2(?:[37][0-9]|2[0-8]|8[0-79]|1[1-9]|0[0124-7]|6[04-9]|4[0-39]|5[014]|9[234])|9(?:2[0-35-9]|1[0-35689]|[35][01346-9]|4[0-6]|6[024-7]|7[15-9]|9[01256]|8[01478]|0[02349])|1(?:[346-9][0-9]|5[0-689]|[02][1-9]|1[13-6]))|2(?:7(?:3[0-9]|9[0-5789]|5[0-46-9]|6[0-35-9]|1[0-7]|0[0-35-8]|7[03-9]|2[0125679]|8[02-7]|4[5789])|3(?:[25][0-9]|4[0-8]|1[0124-9]|0[02-9]|3[03 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!perl | |
use strict; | |
use warnings; | |
use LWP::Simple; | |
use DateTime; | |
use Data::Google::Visualization::DataTable; | |
# Create a datatable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head> | |
<script type="text/javascript" src="https://www.google.com/jsapi"></script> | |
<script type="text/javascript"> | |
google.load("visualization", "1", {packages:["corechart","table"]}); | |
google.setOnLoadCallback(drawChart); | |
function drawChart() { | |
var data = new google.visualization.DataTable( { | |
"cols": [ | |
{"id":"date","label":"Month Beginning","type":"date"}, |