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 strict; | |
use warnings; | |
use Imager; | |
use Imager::QRCode qw(plot_qrcode); | |
use Encode; | |
my $img = plot_qrcode('http://mbkr.jp/_kw_l?i=155923'); | |
$img->write(file => "qrcode.gif"); |
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
TTでURLに埋め込む文字列をエンコードするときは「url」じゃなくて「uri」を使う |
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
test |
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
152 # product_idに対応する商品情報を取得 | |
153 my $sth_item = $dbh_slave->prepare(<<"SQL"); | |
154 select | |
155 d.picture_name, | |
156 i.item_color, | |
157 i.item_size | |
158 from | |
159 m_product p, | |
160 m_item i, | |
161 item_image_data d |
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
my $schema = MyAPP::Schema->connect( | |
'dbi:mysql:myapp_devel;host=localhost;', | |
'root', | |
'', | |
{ | |
AutoCommit => 1, | |
RaiseError => 1, | |
PrintError => 1, | |
RootClass => 'DBIx::Encoding', | |
encoding => 'cp932', |
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
sub bind_param { | |
my ($self, @args) = @_; | |
my $encoding = $self->{private_dbix_encoding}->{encoding}; | |
$args[1] = Encode::encode($encoding, $args[1]); | |
return $self->SUPER::bind_param(@args); | |
} |
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
$ cat /etc/apache2/other/proxy_isucon.conf | |
ProxyRequests Off | |
<Proxy *> | |
Order deny,allow | |
Allow from all | |
</Proxy> | |
ProxyPass / http://127.0.0.1:5000/ | |
ProxyPassReverse / http://127.0.0.1:5000/ |
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
test |
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
427c427,429 | |
< for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > const_iv; ) | |
--- | |
> /* To work around MacOS llvm-gcc bug: http://llvm.org/bugs/show_bug.cgi?id=9891 */ | |
> const void* civ_start = const_iv; | |
> for (civ = const_iv + sizeof (const_iv) / sizeof (const_iv [0]); civ-- > civ_start; ) |
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
$ cat .tmux.conf | |
## UTF-8を用いるかどうかはロケールから自動検出される(必要のある場合のみ指定) | |
#set-window-option -g utf8 on | |
#set-option -g status-utf8 on | |
## 既定のPrefixキー(Ctrl+b)の割り当てを解除 | |
unbind-key C-b | |
## Ctrl+jをPrefixキーにする | |
set-option -g prefix C-j | |
bind-key C-j send-prefix |
OlderNewer