Summary
PHPのパッケージ管理マネージャ Composer を導入する。Install (Linux)
% curl -sS https://getcomposer.org/installer | php
% mv composer.phar /path/to/composer
Install (Homebrew)
% brew install composer
Reference
Composerhttps://getcomposer.org/
% curl -sS https://getcomposer.org/installer | php
% mv composer.phar /path/to/composer
% brew install composer
% brew install pyenv pyenv-virtualenv
# pyenv
eval "$(pyenv init -)"
if [[ -d $HOME/.pyenv ]]; then
export PATH="$HOME/.pyenv/shims:$PATH"
fi
% git clone git://github.com/phpenv/phpenv.git .phpenv
% $HOME/.phpenv/bin/phpenv-install-all-darwin
# phpenv
eval "$(phpenv init -)"
if [[ -d $HOME/.phpenv ]]; then
export PATH="$HOME/.phpenv/bin:$HOME/.phpenv/shims:$PATH"
fi
% cd $HOME/.phpenv/shims
% cp php php-fpm
% cd $HOME/.phpenv/versions/X.X.X/bin
% ln -s php-fpm ../sbin/php-fpm
% brew install perl-build plenv
% plenv install-cpanm
# plenv
eval "$(plenv init -)"
if [[ -d $HOME/.plenv/shims ]]; then
export PATH="$HOME/.plenv/shims:$PATH"
fi
% plenv install 5.18.2
% plenv global 5.18.2
% which perl
$HOME/.plenv/shims/perl
% which cpanm
$HOME/.plenv/shims/cpanm
######################
# Webページのスクリーンショットを挿入する
# usage: {{screenshot('URL')}}
sub screenshot{
my ($url) = @_;
my $width = 400;
my $enc = URI::Escape::uri_escape($url);
return qq(<a href="$url"><img src="http://s.wordpress.com/mshots/v1/$enc?w=$width"></a>);
}