Skip to content

Instantly share code, notes, and snippets.

use utf8;
use strict;
use warnings;
use Encode qw(encode_utf8 decode_utf8);
# 文字が指定のバイト数を超えている場合に切り取る。
sub kirisute_gomen {
my ($string, $byte_len, $str_len) = @_;
return $string if (length(encode_utf8($string)) <= $byte_len && length($string) <= $str_len);
@niratama
niratama / twpicdl.sh
Last active November 26, 2019 11:46 — forked from marbocub/twpicdl.sh
#!/bin/sh
# Modified by Stan Schwertly to download locally rather than to send to Posterous.
# Github: http://github.com/Stantheman/Twitpic-Backup
# Copyright 2010 Tim "burndive" of http://burndive.blogspot.com/
# This software is licensed under the Creative Commons GNU GPL version 2.0 or later.
# License informattion: http://creativecommons.org/licenses/GPL/2.0/
# This script is a derivative of the original, obtained from here: