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
alias gs='git status ' | |
alias ga='git add ' | |
alias gb='git branch ' | |
alias gc='git commit' | |
alias gd='git diff' | |
alias go='git checkout ' | |
alias gk='gitk --all&' | |
alias gx='gitx --all' |
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
[alias] | |
co = checkout | |
ci = commit | |
st = status | |
br = branch | |
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short | |
type = cat-file -t | |
dump = cat-file -p | |
[push] |
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
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
RED="\[\033[0;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
GRAY="\[\033[1;30m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
CYAN="\[\033[0;36m\]" |
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
/** | |
* @Route("/users/delete/{id}", requirements={"id" = "\d+"}, defaults={"id" = 0}) | |
* @Template() | |
*/ | |
public function deleteAction($id) | |
{ | |
if ($id == 0){ // no user id entered | |
return $this->redirect($this->generateUrl('users_list_users_index'), 301); | |
} | |
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
<form action="{{path('users_list_users_add')}}" method="post" {{ form_enctype(form) }}> | |
{{form_widget(form)}} | |
<input type="submit" /> | |
</form> |
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
{% for user in users %} | |
<tr> | |
<td>{{ user.id }}</td> | |
<td>{{ user.name }}</td> | |
<td>{{ user.email }}</td> | |
<td>{{ user.phone }}</td> | |
<td><a href="users/edit/{{ user.id }}">Edit</a></td> | |
<td><a href="users/delete/{{ user.id }}">Delete</a></td> | |
</tr> | |
{% endfor %} |
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
/** | |
* @Route("/users") | |
* @Template() | |
*/ | |
public function indexAction() | |
{ | |
$repository = $this->getDoctrine() | |
->getRepository('UsersListBundle:Users'); | |
$users = $repository->findAll(); |
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
@charset "utf-8"; | |
/* CSS Document */ | |
::selection{ background-color: #E13300; color: white; } | |
::moz-selection{ background-color: #E13300; color: white; } | |
::webkit-selection{ background-color: #E13300; color: white; } | |
body { | |
background-color: #fff; | |
margin: 40px; | |
font: 13px/20px normal Helvetica, Arial, sans-serif; |
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 | |
// src/Users/Bundle/ListBundle/Entity/Users.php | |
namespace Users\Bundle\ListBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="users") |
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 | |
namespace Users\Bundle\ListBundle\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\Controller; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; | |
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; | |
class UsersController extends Controller | |
{ |