How is listed with vagrant plugin list |
How to use in Vagrant.has_plugin? | link to plugin.rb in repo |
---|---|---|
bindler | Bindler | fgrehm/bindler |
vagrant-hostmanager | HostManager | smdahlen/vagrant-hostmanager |
vagrant-cachier | vagrant-cachier | fgrehm/vagrant-cachier |
vagrant-aws | AWS | mitchellh/vagrant-aws |
vagrant-rackspace | RackSpace Cloud | mitchellh/vagrant-rackspace |
vagra |
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 | |
use Symfony\Component\HttpKernel\Kernel; | |
use Symfony\Component\Config\Loader\LoaderInterface; | |
class AppKernel extends Kernel | |
{ | |
// .... | |
protected function getKernelParameters() |
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 | |
class LayoutExtension extends \Twig_Extension | |
{ | |
/** | |
* {@inheritdoc} | |
*/ | |
public function getName() | |
{ | |
return 'yolo'; |
Ao invés de fazer uma querie enorme com CASE-THEN-ELSE, usar a função COALESCE. Ela retorna o primeiro argumento NOT NULL.
Isso:
SELECT CASE WHEN evento.realizado_em IS NULL THEN '' ELSE evento.realizado_em END FROM TableA
Vira isso:
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 My\Custom\Doctrine2\Function; | |
/** | |
* RandFunction ::= "RAND" "(" ")" | |
*/ | |
class Rand extends FunctionNode | |
{ | |
public function parse(\Doctrine\ORM\Query\Parser $parser) |
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
PS1='\[\033[0;37m\][\t]\[\033[0;32m\][\u]\[\033[31m\][\h]`git branch 2>/dev/null | grep \* | head -1 | sed "s/\* //g" | awk "{ print \"[ \"\\\$1 \" ]\" }"` \[\033[1;33m\]\w\a\[\033[0m\]\n\$ ' |
Linux installation notes (tested under Ubuntu 12.04LTS), assuming VirtualBox is already installed on host.
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
#! /bin/sh | |
# apaga tmp | |
find /tmp/ -type f -print -delete | |
# apaga logs compactados | |
find /var/log/ -type f -iname *.gz -print -delete | |
# zera conteudo dos logs | |
find /var/log/ -type f -print -exec truncate -s 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
function git_branch_name() { | |
git branch 2>/dev/null | grep -e '^*' | sed -E 's/^\* (.+)$/(\1) /' | |
} | |
function show_colored_git_branch_in_prompt() { | |
PS1="\[\033[01;32m\]\u@\h:\[\033[01;34m\]\w\[\033[31m\]\$(git_branch_name)\[\033[m\]$ " | |
} | |
show_colored_git_branch_in_prompt |
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
Vagrant::Config.run do |config| | |
config.vm.customize do |vm| | |
vm.name = "PHP dev" | |
vm.memory_size = 512 | |
end | |
# Every Vagrant virtual environment requires a box to build off of. | |
config.vm.box = "ubuntu32" | |
# Assign this VM to a host only network IP, allowing you to access it |