Skip to content

Instantly share code, notes, and snippets.

View rodolfoliviero's full-sized avatar
🎯
Focusing

Rodolfo Liviero rodolfoliviero

🎯
Focusing
  • São Paulo, Brazil
View GitHub Profile
perl -pi -e "s/Factory/create/g" spec/models/*
@rodolfoliviero
rodolfoliviero / gist:2722202
Created May 17, 2012 23:13 — forked from marcosinger/gist:2722199
Cloning all listed projects, creating a gemset and runs Bundle install
#!/bin/bash
current_path=`pwd`
projects=(webdesk/webdesk webdesk/webdesk-provisioner webdesk/webdesk-product-api
webchat/webchat webchat/webchat-provisioner webchat/webchat-product-api
pabx-virtual/pabx-virtual-2011 pabx-virtual/pabx-provisioner
pabx-virtual/pabx-product-api pabx-virtual/ruby_pabx_core
saas_plan_config/saas_plan_config
locaweb-utilities/x9 package_pipeline/package_pipeline
product-apify/product-apify feed_consumer/feed_consumer
@rodolfoliviero
rodolfoliviero / jstryker
Created September 19, 2011 19:13
JStryker disable Referential Integrity
Coloca isso no @before. Criar uma classe que faz isso ai é só chamar no before de cada classe.
No After faz a mesma coisa.
Connection connection = ConnectionHelper.getConnection();
disableHsqldbDatabaseReferentialIntegrity(connection);
cleanInsert("dataset.xml", connection);
connection.close();
@rodolfoliviero
rodolfoliviero / HibernateTransactionInterceptor
Created May 5, 2011 15:55
Override default vraptor HibernateTransactionInterceptor
import br.com.caelum.vraptor.Intercepts;
import br.com.caelum.vraptor.Validator;
import br.com.caelum.vraptor.core.InterceptorStack;
import br.com.caelum.vraptor.http.MutableResponse;
import br.com.caelum.vraptor.interceptor.Interceptor;
import br.com.caelum.vraptor.resource.ResourceMethod;
import org.hibernate.Session;
import org.hibernate.Transaction;
@Intercepts