Skip to content

Instantly share code, notes, and snippets.

#!/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
@wakaba
wakaba / repos.txt
Last active October 15, 2016 06:43
We couldn’t find that file to show.
@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);
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 = [];
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 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;
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+)$/) {
@wakaba
wakaba / Makefile
Last active December 28, 2015 12:19
## Open JTalk installer
##
## hts_engine <http://hts-engine.sourceforge.net/>
## Open JTalk <http://open-jtalk.sourceforge.net/>
## NIT ATR503 M001 <http://open-jtalk.sourceforge.net/readme_hts_voice_nitech_jp_atr503_m001.php>
## Mei <http://sourceforge.net/projects/mmdagent/files/MMDAgent_Example/>
##
## Usage:
##
## # apt-get install mono-runtime
bin/cinnamon
|call
v call
CLI -------------------------------------------------------------------> deploy.pl
|call |
v |
+- - - - - - -> task |
: |call |
: V |
: DSL |
bin/cinnamon
|
Cinnamon::CLI
+------------------Getopt::Long::Parser
+------------------Cinnamon::KeyChain
+------------------Cinnamon::Logger <-------------------------------------------+
| | |
Cinnamon::Context <-----------------------------------------------------Cinnamon |
| | | |
+------------------deploy.pl-----------------+-------------+---------Cinnamon::DSL=Cinnamon::DSL::Capistrano