Skip to content

Instantly share code, notes, and snippets.

@isidromerayo
isidromerayo / DefaultControllerTest.php
Last active October 13, 2015 15:18
Symfony2 WebTestCase client status code 200
<?php
namespace Hcuv\TiendaBundle\Tests\Controller;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
class DefaultControllerTest extends WebTestCase
{
public function testPortadaTienda()
{
@isidromerayo
isidromerayo / UsuarioRepositoryTest.php
Created December 5, 2012 13:42
symfony2 UsuarioRepositoryTest
<?php
namespace Hcuv\UsuarioBundle\Tests\Entity;
use Symfony\Bundle\FrameworkBundle\Test\WebTestCase;
/**
* Description of UsuarioRepositoryTest
*
*/
class UsuarioRepositoryTest extends WebTestCase
@isidromerayo
isidromerayo / dev-tmux.sh
Created December 15, 2012 13:45
Tmux prepare enviroment to TDD/BDD with vim and "autotest" :D
#!/bin/bash
# http://stackoverflow.com/questions/5609192/how-to-set-up-tmux-so-that-it-starts-up-with-specified-windows-opened
tmux new-session -d
tmux split-window -h
tmux split-window -v
tmux -2 attach-session -d
@isidromerayo
isidromerayo / gist:4312502
Last active December 9, 2015 18:48
Chuleta VIM, de las cosas que nunca me acuerdo #loser ;)
Copiar y pegar
--------------
"v" -> selección libre
"V" -> selección líneas
"d" para borrar o "y" para copiar
"p" para pegar
@isidromerayo
isidromerayo / .vimrc
Created December 18, 2012 21:09
.vimrc en nikki 2012-12-18
" no vi-compatible
set nocompatible
" Setting up Vundle - the vim plugin bundler
let iCanHazVundle=1
let vundle_readme=expand('~/.vim/bundle/vundle/README.md')
if !filereadable(vundle_readme)
echo "Installing Vundle..."
echo ""
silent !mkdir -p ~/.vim/bundle
@isidromerayo
isidromerayo / .tmux.conf
Created December 24, 2012 11:44
tmux configuration
# change prefix
unbind C-b
set -g prefix C-a
# Pane switching with Alt+arrow
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
@isidromerayo
isidromerayo / gist:4510287
Created January 11, 2013 12:19
git replacing LF with CRLF - LF will be replaced by CRLF
# covert file
dos2unix filename
# conver recursive
find XXX -type f | xargs dos2unix
@isidromerayo
isidromerayo / .htaccess
Created January 21, 2013 13:04
CentOS 5 run symfony into alias directory
# /var/www/demo_deploy/.htaccess
# enable symbolic links
Options +FollowSymLinks
# short_open_tag to off
php_flag short_open_tag Off
@isidromerayo
isidromerayo / gist:4586163
Created January 21, 2013 13:45
Git+SVN - http://javisantana.github.com/slides/git-svn/#1 - Crear la estructura en svn y subir cambios de Git a SVN
#
svn mkdir --parents http://host/path/to/repo/{trunk,tags,branches} \
-m "Standard layout for $project"
git svn init -s http://host/path/to/repo/
git svn fetch
git rebase trunk master
git svn dcommit
[remote "all"]
url = https://github.com/isidromerayo/simple_php_skeleton.git
url = https://bitbucket.org/isidromerayo/skeleton_php_project.git
# fetch = +refs/heads/*:refs/remotes/origin/*