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
// These may take a bit to run, depending on how much you have, | |
// but you should be done by morning if you leave it over night with the right configuration | |
// Open Twitter profile likes page | |
// Copy paste the minified jquery straight into the console | |
// Adjust the interval and count as you wish | |
var count = 1; | |
var interval = setInterval( clearLikes, 600 ); | |
function clearLikes() { | |
count++; |
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 Dancer2::Plugin::With; | |
use strict; | |
use warnings; | |
use Dancer2::Plugin; | |
plugin_keywords( qw< add_with route_with > ); | |
has 'with_reg' => ( | |
'is' => 'ro', |
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 Dancer2; | |
use Text::CSV_XS qw< csv >; | |
use Path::Tiny qw< path >; | |
use JSON::MaybeXS qw< encode_json >; | |
# Create a CSV parser | |
my $csv = Text::CSV_XS->new({ | |
'binary' => 1, | |
'auto_diag' => 1, | |
}); |
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
.--------------------. | |
.---------| Dancer2::Core::App |-----------.------------. | |
| '--------------------' | | | |
| | | v | |
v | | .-----------------. | |
.--------------. | | | D2::C::Response | | |
| routes | | | '-----------------' | |
|--------------| | | .-----------------. | |
| D2::C::Route | | | | D2::C::Request | |
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 MyApp; | |
use Carp; | |
use Dancer2; | |
my %routes; | |
sub uri_for_it { | |
my ( $name, $vars ) = @_; | |
my $route = $routes{$name}; | |
my $route_path = $route->spec_route; |
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
How to read the statistics: | |
* Implementations: | |
- "orig" -> HTTP::Headers | |
- "fast" -> HTTP::Headers::Fast | |
- "fast_xs" -> HTTP::Headers::Fast::XS | |
* Time: how long it took to run | |
* Percentages: Improvement in percentages. | |
(these are not the same as with Benchmark.pm) | |
$ perl -Iblib/lib/ -Iblib/arch/ tools/dumbbenchmark.pl push_header push_header_many get_header set_header |
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 IO::All; | |
use IO::All::LWP; | |
use Web::Query; | |
local $| = 1; | |
wq('http://podbay.fm/show/536258179') |
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
# app.pl: | |
use MyApp::Web; | |
use MyApp::Web::API; | |
use Plack::Builder; | |
builder { | |
mount '/' => MyApp::Web->to_app; | |
mount '/api' => MyApp::Web::API->to_app; | |
}; |
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
MetaCPAN::API::Rating { | |
Parents Moo::Object | |
public methods (9) : author, date, details, distribution, helpful, new, rating, release, user | |
private methods (1) : _known_fields | |
internals: { | |
data { | |
author "PLACEHOLDER", | |
date "2014-03-02T12:20:07", | |
distribution "Moose", | |
rating 4.9, |
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 v5.10; | |
use MetaCPAN::API; | |
use Data::Dumper; | |
use List::AllUtils qw(min max); | |
use DateTime; | |
use DateTime::Format::ISO8601; | |
my @score_label = qw( | |
Abysmal | |
Poor |
NewerOlder