This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ aws s3 ls --recursive s3://<bucket_name>/<somewhere> | grep -e '.jpg$' | awk '{ print "s3://<bucket_name>/"$4 }' | while read origname; do aws s3 mv ${origname} ${origname}.bak; aws s3 mv ${origname}.bak ${origname} --metadata-directive REPLACE --content-type "image/jpeg"; done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"method": "NHERD", | |
"parameter": { | |
"regularization_weight": 0.001 | |
}, | |
"converter": { | |
"num_filter_types": { | |
}, | |
"num_filter_rules": [ | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- ha_mroonga.cpp.orig 2012-04-29 09:51:15.000000000 +0900 | |
+++ ha_mroonga.cpp 2012-06-05 17:33:45.000000000 +0900 | |
@@ -117,6 +117,7 @@ | |
static grn_hash *mrn_hash; | |
static CHARSET_INFO *mrn_charset_utf8 = NULL; | |
+static CHARSET_INFO *mrn_charset_utf8mb4 = NULL; | |
static CHARSET_INFO *mrn_charset_binary = NULL; | |
static CHARSET_INFO *mrn_charset_ascii = NULL; | |
static CHARSET_INFO *mrn_charset_latin1_1 = NULL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# vim: set fileencoding=utf-8 filetype=ruby ts=4 : | |
stations = %w(東京 有楽町 新橋 浜松町 田町 品川 大崎 五反田 目黒 恵比寿 渋谷 原宿 代々木 新宿 新大久保 高田馬場 目白 池袋 大塚 巣鴨 駒込 田端 西日暮里 日暮里 鶯谷 上野 御徒町 秋葉原 神田) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Unicode::Emoji::E4U; | |
binmode(STDOUT, ":utf8"); | |
my $e4u = Unicode::Emoji::E4U->new; | |
# fetch data files from Google Code (default) | |
$e4u->datadir('http://emoji4unicode.googlecode.com/svn/trunk/data/'); | |
my $softbank = $e4u->softbank; # Unicode::Emoji::Google instance | |
print "Jpmobile::Emoticon::SOFTBANK_SJIS_TO_UNICODE = {\n"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# mediarssgen.rb | |
# Creating simple "Media RSS (http://video.search.yahoo.com/mrss)" | |
# from jpegs in specified directories and uri. | |
# | |
# Usage: $ ruby mediarssgen.rb <thumbnail_dir> <image_dir> <uri_root> | |
require 'rubygems' | |
require 'libxml' | |
include LibXML |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'rexml/document' | |
require 'libxml' | |
RUBY_VERSION # => "1.8.6" | |
REXML::Version # => "3.1.7.2" | |
LibXML::XML::LIBXML_VERSION # => "2.6.30" | |
xml = '<hoge><foo><foo/><bar/></foo></hoge>' | |