Skip to content

Instantly share code, notes, and snippets.

@chris4403
chris4403 / grs2hb.pl
Created June 20, 2013 04:36
Google Readerのスター付きアイテムのjsonをはてブへインポートするためのxmlに変換する
#!/usr/bin/env perl
use strict;
use warnings;
use Path::Class;
use HTML::Entities qw(encode_entities);
use JSON::XS;
my $json = Path::Class::file(__FILE__)->dir->file('starred.json')->slurp;
<!DOCTYPE html>
<html lang="ja">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
$(function() {
var p = function(num) {
return ((num + "").length == 1) ? "0" + num : num;
}
var now = new Date();
@chris4403
chris4403 / build.pl
Created November 26, 2010 03:36 — forked from hakobe/build.pl
use strict;
use warnings;
use AnyEvent;
use AnyEvent::HTTPD;
use AnyEvent::Util qw(run_cmd);
use Cwd;
my $httpd = AnyEvent::HTTPD->new (port => 9090);
use strict;
use warnings;
use LWP::Simple qw/get/;
use Perl6::Say;
use JSON::XS;
use Data::Dumper;
# http://words.bighugelabs.com/api.php
my $word = shift or die "input word";
my $api_key = "";
@chris4403
chris4403 / hide_addressbar_for_iphone.js
Created July 7, 2010 05:10
iPhoneのsafariでアドレスバーを隠すoneliner
if (navigator.userAgent.indexOf('iPhone;') != -1) addEventListener("DOMContentLoaded", function() {setTimeout(function () {if (window.pageYOffset === 0) window.scrollTo(0,1);}, 100); }, false);