Skip to content

Instantly share code, notes, and snippets.

View hiboma's full-sized avatar

Hiroya Ito hiboma

View GitHub Profile
@hiboma
hiboma / colorize.pl
Created July 5, 2012 03:26 — forked from Cside/colorize.pl
colorize keywords of logs.
#!/usr/bin/env perl
=head1 Examples
$ tail -f access_log | perl colorize.pl
$ plackup app.psgi 2>&1 | perl colorize.pl
=cut
use strict;
@hiboma
hiboma / battery.rb
Created February 1, 2012 06:08
macのバッテリーのcapacityを記録する
#!/usr/bin/ruby
now = Time.now.to_s
capacity = `ioreg -l | grep MaxCapacity`.chomp.split(" = ")[1]
cyclecount = `ioreg -l | grep CycleCount | grep -v Design`.chomp.split(" = ")[1]
puts now+","+capacity+","+cyclecount