Skip to content

Instantly share code, notes, and snippets.

View sufimalek's full-sized avatar
🖥️
Learning Go

Sufiyan Malek sufimalek

🖥️
Learning Go
  • India
View GitHub Profile
@sufimalek
sufimalek / gist:ebf6bf20f3db8537d503463a9e4a7211
Created March 29, 2017 13:46 — forked from lttlrck/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@sufimalek
sufimalek / 1-Readme.md
Created October 14, 2015 08:02 — forked from FlYos/1-Readme.md
Redirection user by roles after login/logout in symfony2

Description of this Gist

This is the how to for redirection implementation by roles after login or logout in Symfony2

Step

  1. Copy AfterLoginRedirection.php and AfterLogoutRedirection.php to your bundle under the "Redirection" directory
  2. Edit your services.yml file in your bundle and copy/paste the content of services.yml
  3. Edit your security.yml file...
  4. ... add success_handler: redirect.after.login in form_login: section
  5. ... add success_handler: redirect.after.logout in logout: section