As configured in my dotfiles.
start new:
tmux
start new with session name:
| <?php | |
| use Zend\Db\Sql\Select; | |
| // basic table | |
| $select0 = new Select; | |
| $select0->from('foo'); | |
| // 'SELECT "foo".* FROM "foo"'; |
| # Git status bash prompt | |
| # | |
| # In addition to printing the current working directory, this prompt will | |
| # show a number of things if you are in a git repository: | |
| # - The current branch you are in | |
| # - Whether there are untracked files in the repository (there will be an | |
| # asterisk after the branch nome if there are) | |
| # - Whether there are any unmerged/unstaged/staged changes or if the directory | |
| # is clean. See below for the colors that will be used, and change them if | |
| # you'd like. |
As configured in my dotfiles.
start new:
tmux
start new with session name:
| APP_ENV=testing | |
| APP_KEY=base64:DimZ0aVNA8ZWtWxTB4fDxFc6lL1wM2C7evETA4QK3+c= | |
| APP_DEBUG=true | |
| APP_LOG_LEVEL=debug | |
| APP_URL=http://localhost:8081 | |
| DB_CONNECTION=mysql | |
| DB_HOST=mysql | |
| DB_PORT=3306 | |
| DB_DATABASE=secca_testing |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
| <?php | |
| // Bootstrap | |
| // Change chdir to the full path of your Drupal root | |
| define('DRUPAL_ROOT', getcwd()); | |
| $_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'] = $_SERVER['PHP_SELF']; | |
| $_SERVER['REMOTE_ADDR'] = "127.0.0.1"; | |
| $_SERVER['REQUEST_METHOD'] = NULL; | |
| require_once './includes/bootstrap.inc'; | |
| drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); | |
| xcode with development tools | |
| homebrew | |
| rvm | |
| vagrant | |
| virtualbox | |
| iterm2 | |
| alfred | |
| http://spectacleapp.com/ (allows you to snap windows around with kb shortcuts) | |
| BetterSnapTool if spectacle doesn't do what you want | |
| remap your caps lock key to command |
| <?php | |
| namespace Axelvkn\AppBundle\Filter; | |
| use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter; | |
| use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface; | |
| use ApiPlatform\Core\Exception\InvalidArgumentException; | |
| use Doctrine\ORM\QueryBuilder; | |
| class OrSearchFilter extends SearchFilter |
| const dataDump = props => <pre>{JSON.stringify(props, null, 2)}</pre> |