Skip to content

Instantly share code, notes, and snippets.

@isidromerayo
isidromerayo / gist:4794b88f803a2ec82ced
Created November 24, 2014 18:19
symfony installer - Ubuntu 14.04
isidromerayo@nikki:~/projects/Symfony2$ symfony.phar new my_project_installer_2.5 2.5.6
Downloading Symfony...
4.74 MB/4.74 MB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%%
Preparing project...
~/projects/PHP$ php -m
[PHP Modules]
bcmath
bz2
calendar
Core
ctype
curl
date
dba
@isidromerayo
isidromerayo / gist:b9599035d6a827509dd4
Created November 20, 2014 13:07
Test symfony installer
isidromerayo@hurhinfext16:~$ curl -LsS http://symfony.com/installer > symfony.phar
isidromerayo@hurhinfext16:~$ mv symfony.phar bin/
isidromerayo@hurhinfext16:~$ chmod a+x bin/symfony.phar
isidromerayo@hurhinfext16:~$ symfony.phar
isidromerayo@hurhinfext16:~$ cd projects/PHP/
isidromerayo@hurhinfext16:~/projects/PHP$ symfony.phar new my_project
Downloading Symfony...
4,74 MB/4,74 MB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100%
@isidromerayo
isidromerayo / gist:6767054
Created September 30, 2013 17:18
Simple workflow using GitHub from openEHR java-libs
1) Initialize
# Fork button github
# From my fork to my local
$ git clone https://github.com/isidromerayo/java-libs openEHR_java-libs
# Add original repository
$ git remote add upstream https://github.com/openEHR/java-libs
CREATE TABLE gender (
gender_cd integer NOT NULL,
gender_name varchar(64) NOT NULL,
gender_description varchar(255),
gender_code varchar(64) NOT NULL
) WITHOUT OIDS;
insert into gender (gender_cd, gender_name, gender_description, gender_code) values (1, 'Female', 'Female', 'F');
insert into gender (gender_cd, gender_name, gender_description, gender_code) values (2, 'Male', 'Male', 'M');
insert into gender (gender_cd, gender_name, gender_description, gender_code) values (3, 'Other', 'Other', 'O');
@isidromerayo
isidromerayo / pom.xml
Created May 3, 2013 08:59
pom.xml demo test and integration test (with tomcat)
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>es.sacyl.hcuv.tutorial</groupId>
<artifactId>testing-your-restful-web-services</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
@isidromerayo
isidromerayo / SimpleTestListener.php
Created March 8, 2013 08:59
Show time to execute test :)
<?php
class SimpleTestListener implements \PHPUnit_Framework_TestListener
{
public function endTest(\PHPUnit_Framework_Test $test, $time)
{
printf("Test '%s' terminado y ha tardado %s segundos " . PHP_EOL,
get_class($test) . '=>' . $test->getName(),
number_format($time,3)
);
@isidromerayo
isidromerayo / XxxControllerTest.php
Last active December 14, 2015 15:29
symfony2 functional test using routes
<?php
$route = static::$kernel->getContainer()->get('router')->generate('hcuv_comment_create', array('blog_id' => 1));
$crawler = $client->request('POST', $route);
$messageError = ''; // $crawler->filter('div.text_exception h1')->text();
[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/*
@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