Skip to content

Instantly share code, notes, and snippets.

View motemen's full-sized avatar
🌴
On vacation

Hironao OTSUBO motemen

🌴
On vacation
View GitHub Profile
var BASE_URL = 'https://www.amazon.co.jp/gp/css/order-history';
var Gatherer = (function () {
function Gatherer() {
this.year = new Date().getFullYear();
this.page = 1;
this.result = [];
}
Gatherer.prototype.start = function () {
var d = $.Deferred();
@motemen
motemen / CartonPacker.pm
Created October 29, 2013 08:47
while ! carton exec perl -MCartonPacker foo.pl do; sleep 3; done
package CartonPacker;
use strict;
use warnings;
use Config;
BEGIN {
# as lib::core::only
@INC = @Config{qw(privlibexp archlibexp)};
}
@motemen
motemen / 01_ex.rb
Last active December 24, 2015 01:29
SimpleCov and multiple loads
if $flag
p :true
else
p :false
end
User: motemen
Host: dominica.local
Date: 2013年 9月25日 水曜日 18時40分43秒 JST
Directory: /Users/motemen/work/op
Git-Revision: 568cc195834d2bc6a94dfe5e69620d92433e1dfa (master)
% ruby -e 3.times { |i| p i; sleep 1 }; abort 'bye'
[Wed Sep 25 18:40:44 2013] OUT 0
[Wed Sep 25 18:40:45 2013] OUT 1
[Wed Sep 25 18:40:46 2013] OUT 2
@motemen
motemen / dic
Created August 21, 2013 08:30
look up Dictionary.app from console
#!/bin/sh
open dict://"$*"
###
### azik-local.rule -- AZIK 用設定
###
q,ん,ン,ン
m;,ました,マシタ,マシタ
d;,でした,デシタ,デシタ
s;,します,シマス,シマス
z.,…,…,…
@motemen
motemen / ga.pl
Last active December 20, 2015 14:58
#!/usr/bin/env perl
use strict;
use warnings;
use Config::CmdRC '.garc';
use List::UtilsBy qw(rev_nsort_by);
use Net::Google::Analytics;
use Net::Google::Analytics::OAuth2;
use Text::UnicodeTable::Simple;
use Time::Piece;
use Time::Seconds;
@motemen
motemen / feed-notifier.rb
Created July 18, 2013 04:28
Poll a feed and send new entries to notification center
require 'feedzirra'
require 'terminal-notifier'
require 'logger'
url = ARGV.shift
@logger = Logger.new(STDERR)
def notify_entry(entry, feed)
@logger.debug %Q(Notifing entry "#{entry.title}" <#{entry.url}>)
TerminalNotifier.notify(entry.title, title: feed.title, open: entry.url)
// ==UserScript==
// @name Correct VA ages
// @namespace http://motemen.github.io/
// @description Correct VA ages to 17
// @match *://www.google.com/search*
// @match *://www.google.co.jp/search*
// ==/UserScript==
var answer = document.querySelector('.answers .answer_predicate');
var knop = document.querySelector('#knop');
@motemen
motemen / gist:5088348
Last active December 14, 2015 12:39
顔文字集
(;´Д`)
。゚(゚´ω`゚)゚。ピー
。゚( ゚^∀^゚)σ゚
\\\\└('ω')」////
( ╹ㅂ╹)
( ╹◡╹)
✌( 'ω' )
( ^o^)Г☎チンッ
⊂(^ω^)⊃
(´⊙ω⊙)