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 Dancer; | |
use LWP::UserAgent; | |
get '/' => sub { | |
return <<EOF; | |
<html> | |
<head> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script> | |
<script type="text/javascript"> |
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
name = App-Scrobble | |
author = Adam Taylor <[email protected]> | |
license = Perl_5 | |
copyright_holder = Adam Taylor | |
copyright_year = 2012 | |
[@Basic] | |
[PodSyntaxTests] | |
[PodCoverageTests] |
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
#!/usr/bin/env perl | |
# PODNAME: App::scrobble | |
# ABSTRACT: foo | |
# VERSION | |
use strict; | |
use warnings; | |
use App::Scrobble; |
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
// ==UserScript== | |
// @name MetaCPAN Everywhere | |
// @description Add to every link to CPAN a link to MetaCPAN on a Google results page. | |
// @namespace http://ajct.info | |
// @match http://*/* | |
// @version 0.1 | |
// ==/UserScript== | |
(function() { |
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
var jerk = require( 'jerk' ), | |
sys = require( 'sys' ), | |
sqlite = require( 'sqlite' ); | |
var options = { | |
server: 'irc.freenode.net', | |
nick: 'Laurabelle', | |
channels: [ '#kkkk', ] | |
} |
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
adam:~ adam$ which cpanm | |
/Users/adam/perl5/perlbrew/bin/cpanm | |
adam:~ adam$ cpanm -V | |
cpanm (App::cpanminus) version 1.4001 | |
adam:~ adam$ cpanm --scandeps WWW::NewsReach | |
--> Working on WWW::NewsReach | |
Fetching http://search.cpan.org/CPAN/authors/id/A/AJ/AJCT/WWW-NewsReach-0.03.tar.gz ... OK | |
Configuring WWW-NewsReach-0.03 ... OK | |
WWW-NewsReach-0.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
sub _format_key { | |
my $class = shift; | |
my ( $key ) = @_; | |
# Localise $_ so we can use functions that operate on $_ for berevity | |
local $_ = $key; | |
# Convert to the correct format/case | |
s/publishDate/publish_date/ if /publishDate/; | |
s/lastModifiedDate/last_modified_date/ if /lastModifiedDate/; |
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
cpanm (App::cpanminus) 0.9929 on perl 5.008008 built for darwin-thread-multi-2level | |
Work directory is /Users/adam/.cpanm/work/1275128041.41102 | |
You have make /usr/bin/make | |
You have LWP 5.834 | |
You have /usr/bin/tar: tar (GNU tar) 1.15.1 | |
You have /usr/bin/unzip | |
Searching Dist::Zilla on cpanmetadb ... | |
Fetching http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Dist-Zilla-3.101461.tar.gz ... OK | |
Unpacking Dist-Zilla-3.101461.tar.gz | |
Entering Dist-Zilla-3.101461 |
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
public void updatePercepts() { | |
// manual hack to work(?) for all the taxi agent | |
for(int i = 0;i<3;i++) { | |
int j = i + 1; | |
String name = "taxi" + j; | |
clearPercepts(name); | |
// get the robot location |
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
#!/usr/bin/perl -w | |
use strict; | |
use WWW::Mechanize; | |
use Data::Dumper; | |
main(); | |
sub main { | |
my $mech = WWW::Mechanize->new(); |
NewerOlder