This file contains hidden or 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
$val = Validation::forge(); | |
// クロージャを設定 | |
// Validation の _validation_required メソッドを利用する | |
$required_rule = function ($v) use ($val) { return $val->_validation_required($v); }; | |
// テキストフォーム | |
$val->add('name', 'お名前') | |
->add_rule(['required_name' => $required_rule]); | |
$val->set_message('required_name', 'お名前を入力してください。'); |
This file contains hidden or 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
public function action_index() | |
{ | |
// カテゴリ1の総数を取得する。 | |
$query = | |
Model_User::query()->where('category_id', 1); | |
$total_items = $query->count(); | |
// Paginationインスタンスを生成 | |
$pagination = Pagination::forge('users', [ | |
'total_items' => $total_items, |
This file contains hidden or 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
$ [email protected]:memememomo/Porbo.git | |
$ cd Porbo | |
$ cpanm . |
This file contains hidden or 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
filetype off | |
filetype plugin indent off | |
set runtimepath+=$GOROOT/misc/vim | |
filetype plugin indent on | |
syntax on | |
autocmd FileType go autocmd BufWritePre <buffer> Fmt | |
exe "set rtp+=".globpath($GOPATH, "src/github.com/nsf/gocode/vim") | |
set completeopt=menu,preview |
This file contains hidden or 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
$ php oil refine test |
This file contains hidden or 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": { | |
... | |
"phpunit/phpunit": "4.1.*", | |
"piece/stagehand-testrunner": ">=3.5.0" | |
}, | |
... |
This file contains hidden or 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
class Controller_Public extends Controller_Template | |
{ | |
pubulic function after($response) | |
{ | |
$response = parent::after($response); | |
$response->set_header('X-FRAME-OPTIONS', 'SAMEORIGIN'); | |
return $response; | |
} | |
} |
This file contains hidden or 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
// set default charset | |
ini_set('default_charset', 'UTF-8'); |
This file contains hidden or 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
export LANG=ja_JP.UTF-8 | |
alias vi="vim -u NONE --noplugin" | |
alias v=vim | |
alias g=git | |
alias pl=perl | |
export PATH="$HOME/.rbenv/bin:$PATH" | |
eval "$(rbenv init -)" | |
などなど... |
This file contains hidden or 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
$ cpanm Mojolicious IO::Socket::SSL |