Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 MooXHandlesViaConstructor; | |
use strict; | |
use warnings; | |
use Moo::Role; | |
use MooseX::MungeHas (); | |
use Import::Into; | |
use Class::Method::Modifiers qw(install_modifier); | |
sub import { |
This file contains hidden or 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 Method::Generate::Constructor::Role::HandlesAccessor; | |
use strict; | |
use warnings; | |
use Moo::Role; | |
use B (); | |
around _assign_new => sub { | |
my $orig = shift; | |
my $self = shift; |
This file contains hidden or 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
<?php | |
$apiUrl = "https://www.googleapis.com/civicinfo/us_v1/representatives/lookup?fields=officials&key=AIzaSyARokMXd73Cj3k0rXRFh-s689q_uprujTY"; | |
// $json_url = $apiUrl; | |
// | |
// $json = file_get_contents($json_url); | |
// | |
// $data = json_decode($json,true); | |
// |
This file contains hidden or 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
$WriteMakefileArgs{CONFIGURE} = sub { | |
require Alien::Leptonica; | |
my $l = Alien::Leptonica->new; | |
my $pkg = ExtUtils::Depends->new('Image::Leptonica',); | |
$pkg->set_inc( $l->cflags ); | |
$pkg->set_libs( $l->libs ); | |
$pkg->add_typemaps( 'typemap' ); | |
mkdir catfile qw( lib Image Leptonica ) | |
$pkg->save_config('Image/Leptonica/IFiles.pm'); |
This file contains hidden or 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
From caff15a7196f8428ea2dce8d2d81b61a1ede3b26 Mon Sep 17 00:00:00 2001 | |
Date: Fri, 18 Apr 2014 21:18:06 -0500 | |
Subject: [PATCH] fix pkg-config | |
--- | |
lept.pc.in | 2 ++ | |
1 file changed, 2 insertions(+) | |
diff --git a/lept.pc.in b/lept.pc.in | |
index 8044ba8..c1b9492 100644 |
This file contains hidden or 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use PDL; | |
use DDP; | |
my $d = sequence(4,5); | |
my $xv = sequence(10)+4; | |
my $bin_assignments = abs($d - $xv->dummy(2,1)->mv(0,2))->mv(2,0)->minimum_ind; |
This file contains hidden or 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
#!/bin/sh | |
export LC_CTYPE="C" TZ="America/Los_Angeles" | |
DATE=`date '+%B %d'` | |
STREAK=`perl -Mojo -E 'say g("http://github.com/zmughal")->dom->find("div.contrib-streak-current")->[0]->all_text(0) =~ s,^\s*,,mgsr =~ s,\s*\n, ,mgsr'` | |
STREAK_TODAY="$DATE Current Streak\s*$" | |
echo $STREAK | |
if echo "$STREAK" | grep -q "$STREAK_TODAY"; then | |
echo "We're good" | |
else |
This file contains hidden or 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
#!/bin/sh | |
perl -Mojo -E 'b($ENV{PATH})->split(":")->join("\n")->say' |
This file contains hidden or 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
#!/usr/bin/env bash | |
# See <http://perltricks.com/article/57/2014/1/1/Shazam-Use-Image-Magick-with-Perlbrew-in-minutes> | |
# may need to have the perl configured with -Duseshrplib | |
# | |
# perl -V | grep -- '-Duseshrplib' | |
# compile perl with perlbrew: | |
# |