Skip to content

Instantly share code, notes, and snippets.

@yusukezzz
yusukezzz / pre-commit
Last active December 30, 2015 10:49
git hook pre-commit
#!/bin/sh
REPO_ROOT="$GIT_DIR/.."
cd $REPO_ROOT
composer dump
phpunit
@yusukezzz
yusukezzz / homes.js
Last active December 20, 2015 08:49
homes.js
exports.replyPattern = /https?:\/\/www\.homes\.co\.jp\/([a-z0-9\-.]+)[^\s]+/;
exports.reply = function(client, nick, to, dom)
{
var items = [];
items.push(dom('dd#chk-bkc-moneyroom > span').text().trim());
var tmp = dom('dd#chk-bkc-moneyroom').text().trim().match(/\((.*?)\)/);
items.push(tmp[1].trim());
tmp = dom('dd#chk-bkc-moneyshikirei').text().trim().split('/');
items.push(tmp[1].trim());