かなり便利な引数をみつけたのでメモ。
公式引用
CSS の initial キーワードは、要素のプロパティの初期値を適用するものです。CSS のどのプロパティにも使うことができ、要素はそのプロパティの初期値を使います。
こんな感じ。
h2 { border: initial }
.alert { color: initial }
これは便利こと知りましたわ。
かなり便利な引数をみつけたのでメモ。
公式引用
CSS の initial キーワードは、要素のプロパティの初期値を適用するものです。CSS のどのプロパティにも使うことができ、要素はそのプロパティの初期値を使います。
こんな感じ。
h2 { border: initial }
.alert { color: initial }
これは便利こと知りましたわ。
html5モードが有効な時にリロードしたかったり、angularのroutingから抜け出したい場合。
aタグのtarget属性に_selfを指定してやればおk。
<a href="/index" target="_self">link</a>
まずはPHPUnitをインストールする。
https://phpunit.de/getting-started.html
ソースは基本的に公式を上から読んで作ればおk。
http://docs.symfony.gr.jp/symfony2/book/testing.html
https://phpunit.de/manual/current/ja/installation.html
このページのアサーションメソッドのまとめがくそ便利。
https://phpunit.de/manual/current/ja/appendixes.assertions.html
あとアノテーションもたくさんあって便利。
https://phpunit.de/manual/current/ja/appendixes.annotations.html
よく見に行くのでメモ。
$ APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\ -f1` $ sudo setfacl -R -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/cache app/logs $ sudo setfacl -dR -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/cache app/logs
をまとめようと思ったら公式に神がかり的なマニュアルがあった件。
http://symfony.com/doc/current/book/security.html
http://docs.symfony.gr.jp/symfony2/book/security.html
わかりやすすぎぃぃぃぃぃい。
よくつかうやつ。
■ユーザー作成
php app/console fos:user:create testuser test@example.com p@ssw0rd
■ユーザー有効化
php app/console fos:user:activate testuser
■ユーザー無効化
php app/console fos:user:deactivate testuser
■ユーザーに特定の権限を与える
php app/console fos:user:promote testuser ROLE_ADMIN
■ユーザーから特定の権限を剥奪する
php app/console fos:user:demote testuser ROLE_ADMIN
■ユーザーのパスワードを変更する
php app/console fos:user:change-password testuser newp@ssword
あとは下記公式を参照されたし。
https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/command_line_tools.md
まずはui-router本体を読み込む
angular.module('app', [
'ui.router',
]);
configメソッドでこんな感じで設定
angular
.module('app')
.config(['$urlRouterProvider', '$stateProvider', '$locationProvider',
function($urlRouterProvider, $stateProvider, $locationProvider) {
$stateProvider
/**
* index
*/
.state('index', {
url: '/',
views: {
main: {
templateUrl: '/index.html',
controller: 'indexController',
controllerAs: 'index'
}
}
})
/**
* blog
*/
.state('blog', {
url: '/blog',
views: {
main: {
templateUrl: '/blog.html',
controller: 'blogController',
controllerAs: 'blog'
}
}
})
;
// ルーティングが一致しなかった場合のデフォルト設定はこうする。
$urlRouterProvider.otherwise('/');
// html5モードを有効に
$locationProvider.html5Mode(true).hashPrefix('!');
}]);
あとルーティングを入れ子にできたりもするけどそれはまた今度。