Skip to content

Instantly share code, notes, and snippets.

@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: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 / .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 / .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 / 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 / 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 / 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 / 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 / gist:4042122
Created November 8, 2012 22:19
problems to update packagist.ogr
[Composer\Repository\InvalidRepositoryException] Some branches contained invalid data and were discarded, it is advised to review the log and fix any issues present in branches
Reading composer.json of isidromerayo/simple_php_skeleton (v0.6)
Importing tag v0.6 (0.6.0.0)
Reading composer.json of isidromerayo/simple_php_skeleton (v0.5)
Importing tag v0.5 (0.5.0.0)
Reading composer.json of isidromerayo/simple_php_skeleton (gh-pages)
Skipped branch gh-pages, no composer file
Reading composer.json of isidromerayo/simple_php_skeleton (master)
Importing branch master (dev-master)
Skipped branch master, Invalid package information:
@isidromerayo
isidromerayo / Guardfile
Created November 8, 2012 09:54
guard phpunit symfon2 to src/Hcuv
guard 'phpunit', :cli => '-c app/ ', :tests_path => 'src',
:keep_failed => true, :all_after_pass => true do
watch(%r{^src/Hcuv/(.+)Tests/.+Test\.php$}) { |m| "#{m[0]}" }
watch(%r{^src/Hcuv/(.+)/(.*)/(.+)\.php$}) { |m| "src/Hcuv/#{m[1]}/Tests/#{m[2]}/#{m[3]}Test.php" }
end