In this example folders shoulb be in this way
gulpfile.js
font-template.scss
icons/
ico-user.svg
ico-save.svg
...
fonts/
myfont.eot
/* | |
RESPONSIVE MIXINS based on bootstrap breakponts | |
*/ | |
@mixin mobile() { | |
@media (max-width: $screen-xs-max) { | |
@content; | |
} | |
} | |
@mixin notMobile() { |
In this example folders shoulb be in this way
gulpfile.js
font-template.scss
icons/
ico-user.svg
ico-save.svg
...
fonts/
myfont.eot
@font-face { | |
font-family: "<%= fontName %>"; | |
src: url('<%= fontPath %><%= fontName %>.eot'); | |
src: url('<%= fontPath %><%= fontName %>.eot?#iefix') format('eot'), | |
url('<%= fontPath %><%= fontName %>.woff') format('woff'), | |
url('<%= fontPath %><%= fontName %>.ttf') format('truetype'), | |
url('<%= fontPath %><%= fontName %>.svg#<%= fontName %>') format('svg'); | |
font-weight: normal; | |
font-style: normal; | |
} |
git config --global user.name "John Doe"
git config --global user.email "[email protected]"
Use --global
to set the configuration for all projects. If git config
is used without --global
and run inside a project directory, the settings are set for the specific project.
# ZSH Theme - Preview: http://gyazo.com/8becc8a7ed5ab54a0262a470555c3eed.png | |
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" | |
local user_host='%{$terminfo[bold]$fg[green]%}%n@%{$reset_color%}' | |
local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' | |
local rvm_ruby='' | |
if which rvm-prompt &> /dev/null; then | |
rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}' | |
else | |
if which rbenv &> /dev/null; then |
We needed to decide whether a user loaded from FOSUserBundle is granted a specific role. Because of the role hierarchy, this is not as simple as doing in_array($role, $user->getRoles())
. The user model only knows about its roles, not about what other roles those roles grant it.
The only thing that handles this situation that i found is the SecurityContext::isGranted method. But the problem of that is that its a check about the role of the "current" user. We needed this information in a command that generates a file and needs to know which user has permission for a specific role.
The RoleHierarchy service can not do decisions but only explode roles into all roles granted through the tree. The RoleHiararchyVoter is part of the security manager. Both are private service and thus not intended to be reused in application code.
The simplest we could come up with is this code, which we use like this:
$roleHierarchy = $this->getContainer()->get('acme_demo.security.role_hierarchy_checker');
acme_api: | |
type: rest | |
prefix: / | |
resource: "@AcmeBundle/Resources/config/routing_api.yml" |