Perl製なツールのexiftoolがOSSで公開されてて対応フォーマットも多く、一番良いんじゃ無いかなーと感じた。
exiftool -all= image.jpg
とかで消えた。と思う。
# coding: us-ascii | |
# Copyright (c) 2015 Kenichi Kamiya | |
class Array | |
def all_combinations(&block) | |
return to_enum __callee__ unless block_given? | |
size.downto(1).map { |n| combination(n, &block) } | |
end |
#!/bin/bash | |
# 2015 Kenichi Kamiya | |
# Support to make patch for newer rbx on ruby-versions | |
# Target to Mac OS X | |
# ./this.sh 2.5.7 | |
LANG=C; export LANG | |
if [ $# != 1 ]; then | |
echo "usage: $0 version(ex: 2.5.7)" 1>&2 |
# coding: us-ascii | |
# 2015 Kenichi Kamiya | |
class Array | |
# [6, 5, 1, 4, 3] => [1, 3, 4, 5, 6] | |
def mergesort | |
case size | |
when 0, 1 | |
self | |
when 2 |
import functools | |
def checkio(els): | |
return functools.reduce(lambda x,y: x+y, els[:3]) | |
if checkio([1, 2, 3, 4, 5, 6]) == 6: | |
print('Done!') |
Perl製なツールのexiftoolがOSSで公開されてて対応フォーマットも多く、一番良いんじゃ無いかなーと感じた。
exiftool -all= image.jpg
とかで消えた。と思う。
# coding: us-ascii | |
require 'logger' | |
class MultiLogger | |
def initialize(*destinations) | |
@destinations = destinations.map { |dst| Logger.new dst } | |
end | |
Logger.instance_methods.each do |meth| |
# coding: us-ascii | |
require 'logger' | |
sources = ARGV.dup | |
abort "Pass target sources." if sources.empty? | |
class MultiLogger | |
def initialize(*destinations) | |
@destinations = destinations.map { |dst| Logger.new dst } |
# 「上位含めてundef扱いにする」の上位っていうのは、undefした瞬間じゃなくて動的に判断される? | |
module Super1 | |
def a; end | |
end | |
module Super2 | |
def a; end | |
undef_method :a | |
end |