Skip to content

Instantly share code, notes, and snippets.

sub install_perl_apps_by_file ($$$) {
my ($perl_command, $perl_version, $file_name) = @_;
info_die "|$file_name| not found" unless -f $file_name;
open my $file, '<', $file_name or info_die "$file_name: $!";
while (<$file>) {
tr/\x0D\x0A//d;
if (/^#/) {
#
} elsif (/^(\S+)\s+(\S+)$/) {
javascript:
/* You are granted a license to use, reproduce and create derivative works of this document. */
var root = document;
var r = [];
var items = root.querySelectorAll ('[itemscope]:not([itemprop])');
for (var i = 0; i < items.length; i++) {
if (items[i].namespaceURI !== 'http://www.w3.org/1999/xhtml') continue;
javascript:
/* You are granted a license to use, reproduce and create derivative works of this document. */
function walk (root, enter, exit) {
var node = root;
start: while (node) {
enter(node);
if (node.firstChild) {
node = node.firstChild;
javascript:
/* You are granted a license to use, reproduce and create derivative works of this document. */
var isDirectiveMetadata = {viewport: true, referrer: true};
var isDirectiveLink = {stylesheet: true, shortcut: true, prerender: true, prefetch: true};
function collectMetadata () {
var result = [];
@wakaba
wakaba / htmldiff.pl
Last active December 31, 2015 05:39
# XXX This is a very early prototype.
use strict;
use warnings;
use Path::Class;
use lib glob file (__FILE__)->dir->subdir('modules/*/lib');
use Web::DOM::Document;
use Algorithm::Diff qw(sdiff);
@wakaba
wakaba / repos.txt
Last active October 15, 2016 06:43
We couldn’t find that file to show.
#!/usr/bin/perl
open $file, '>', '.travis-merge';
print $file q{#!/bin/sh
curl -s -S -L -o travis_after_all.py https://gist.githubusercontent.com/wakaba/9970857/raw/travis_after_all.py && \
python travis_after_all.py && \
(ls .to_export_back || echo "BUILD_LEADER=YES BUILD_AGGREGATE_STATUS=others_succeeded" > .to_export_back)
export DUMMY=0 $(cat .to_export_back)
echo "BUILD_LEADER = $BUILD_LEADER, BUILD_AGGREGATE_STATUS = $BUILD_AGGREGATE_STATUS, TRAVIS_BRANCH = $TRAVIS_BRANCH, TRAVIS_COMMIT = $TRAVIS_COMMIT"
if [ "$BUILD_LEADER" = "YES" ]; then
*~
/local/
/perl
/prove
/plackup
/Makefile.setupenv
/cin
/config/perl/libs.txt
/config/
/modules/
use strict;
use warnings;
$ENV{LANG} = 'C';
my @host = qw(
www.google.com
mail.google.com
github.com
gist.github.com
gist.githubusercontent.com
- "../../modules/json-functions-xs" tests
- "../../modules/json-ps" tests
- "../../modules/web-encodings" tests build
- "../../modules/web-url" tests build
- "../../modules/web-dom" tests build
- "../../modules/web-css" tests build
- "../../modules/web-markup" tests build
- "../../modules/web-useragent-functions" tests lwp anyeventsocks oauth wsse cli testws curl
- "../../modules/wanage" tests build datetime mp
- "../../modules/temma" tests