- Elasticsearch にはてなブログのエントリをインデックスさせる
- 本文を kuromoji でアナライズする
- はてなスター取得 API からスターの情報を取得するバッチ
- はてなスターの情報をインデックスに追加する
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 strict; | |
use warnings; | |
use Test::More; | |
use HTML::TreeBuilder::Select; | |
subtest 'class attribute with LF' => sub { | |
my $doc = <<EOS; | |
<div class=" | |
my-class |
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
git log --format="%aN <%aE>" | sort -u | |
# aereal <aereal@aereal.org> | |
# aereal <aereal@users.noreply.github.com> | |
echo "AOKI,Hanae <aereal@aereal.org>" > .mailmap | |
git log --format="%aN <%aE>" | sort -u | |
# AOKI,Hanae <aereal@aereal.org> | |
# aereal <aereal@users.noreply.github.com> | |
echo "aereal <aereal@aereal.org> aereal <aereal@users.noreply.github.com>" > .mailmap | |
git log --format="%aN <%aE>" | sort -u |
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
function numerize(numeric) { | |
return Number(numeric.trim().replace(/,\s*/, '')); | |
} | |
function getNetTotal() { | |
var contents = document.getElementById('contents'); | |
var totalTable = contents.querySelector('table:last-child'); | |
var total = totalTable.querySelector('tr:last-child td:last-child').textContent; | |
return numerize(total); | |
} |
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 ruby | |
require 'optparse' | |
require 'logger' | |
HISTORY_PATTERN = /\A: (?<started>\d+):(?<finished>\d+);(?<text>.+)\z/o.freeze | |
IGNORE_ENTRY_PATTERN = /\A(?:l[sla]?|man|git st\z)/o.freeze | |
REQUIRED_OPTION_NAMES = [:output_file, :input_file, :lines_to_read] | |
Config = Struct.new(:output_file, :input_file, :lines_to_read).new |
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 path = require('path'); | |
var gulp = require('gulp'); | |
var data = require('gulp-data'); | |
var handlebars = require('gulp-compile-handlebars'); | |
var rename = require('gulp-rename'); | |
gulp.task('default', ['html']); | |
gulp.task('html', 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
{ | |
"url": "https://api.github.com/repos/aereal/playground-github-api/deployments/134168", | |
"id": 134168, | |
"sha": "6c16e9486fdf924365856aa906468598c96adc8a", | |
"ref": "0001_feature", | |
"task": "deploy", | |
"payload": { | |
}, | |
"environment": "production", |
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
let s:name = 'aereal' | |
function! s:hello() | |
let name = 'someone' | |
endfunction | |
call s:hello() | |
echo s:name |
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
let paths = [ | |
\ '/Users/aereal/repo/lib', | |
\ '/Users/aereal/repo/extlib', | |
\ '/Users/aereal/repo/local/lib/perl5', | |
\ '/Users/aereal/repo/local/lib/perl5/darwin-2level', | |
\ '/Users/aereal/repo/t/lib', | |
\ '/Users/aereal/repo/lib', | |
\ '/Users/aereal/repo/extlib', | |
\ '/Users/aereal/repo/local/lib/perl5', | |
\ '/Users/aereal/repo/local/lib/perl5/darwin-2level', |
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 IPC::Run (); | |
use List::Util qw(reduce); | |
sub run { | |
my (@cmd) = @_; | |
my $success = IPC::Run::run(\@cmd, \undef, \my $stdout, \my $stderr); | |
return +{ | |
cmd => \@cmd, | |
success => $success, |