Skip to content

Instantly share code, notes, and snippets.

View debug-ito's full-sized avatar

Toshio Ito debug-ito

View GitHub Profile
@debug-ito
debug-ito / hrr_delete.svg
Created May 22, 2015 03:40
haskell-relational-record cheat sheet
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@debug-ito
debug-ito / gcal2busybird.rb
Last active August 29, 2015 14:07
Load Google Calendar events and convert them into BusyBird statuses
#!/usr/bin/env ruby
# coding: utf-8
## See also: http://qiita.com/mechamogera/items/bf2ed20e332dc31d2352
require 'google/api_client'
require 'json'
require 'date'
require 'optparse'
@debug-ito
debug-ito / cps_perl.pl
Created January 2, 2013 07:12
examples to loop CPS functions in Perl
#!/usr/bin/env perl
=pod
=head1 NAME
cps_loop.pl - examples to loop CPS functions
=head1 SYNOPSIS
@debug-ito
debug-ito / loading.pl
Created December 2, 2012 01:39
Load Twitter user_timeline repeatedly using AnyEvent, Async::Defer and Promises
=pod
=head1 NAME
Load Twitter user_timeline repeatedly using AnyEvent, Async::Defer and Promises
=head1 SYNOPSIS
This script demonstrates how we can use Async::Defer or Promises
module to send requests to twitter.com repeatedly in an asynchronous
@debug-ito
debug-ito / promises_future_defer.pl
Created November 23, 2012 07:55
Comparing Promises, Future and Async::Defer in four (+1) scenarios
#!/usr/bin/env perl
=pod
=head1 NAME
Comparing Promises, Future and Async::Defer in four (+1) scenarios
=head1 SYNOPSIS
@debug-ito
debug-ito / fix_boundingbox
Created February 26, 2012 00:42
Fix bounding box of an input EPS file using eps2eps command
#!/bin/sh
E2E=/usr/bin/eps2eps
EGREP=/bin/egrep
SED=/bin/sed
infile="$1"
bb=`$E2E -sOutputFile=- "$infile" dummy | $EGREP '%%BoundingBox: *-?[0-9]+ +-?[0-9]+ +-?[0-9]+ +-?[0-9]+$'`
$SED -e "s/^%%BoundingBox:.*\$/$bb/" "$infile" | $SED -e "s/^%%PageBoundingBox:.*$//"