Skip to content

Instantly share code, notes, and snippets.

@aVolpe
aVolpe / datasource.xml
Created September 12, 2014 19:31
Jboss sample informix datasource
<datasource jta="true" jndi-name="java:jboss/datasources/CopacoBillingDS" pool-name="CopacoBillingDS" enabled="true" use-ccm="true">
<connection-url>jdbc:informix-sqli://10.13.200.41:9088/copaco_prueba01:informixserver=copacodb</connection-url>
<driver>informix-jdbc</driver>
<security>
<user-name>USER</user-name>
<password>PASS</password>
</security>
</datasource>
@mortezaadi
mortezaadi / persistence.xml
Last active July 23, 2024 00:45
persistence xml configurations for major databases and jpa providers
<?xml version="1.0" encoding="UTF-8"?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
version="1.0">
<!-- derby -->
@fiunchinho
fiunchinho / tdd
Last active December 25, 2015 10:19
Watch for changes in files (code and tests) and run phpunit tests whenever changes are detected. Althought is not needed, I recommend to use a phpunit.xml configuration file.
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: $0 CODE-DIRECTORY"
exit 1
fi
code_directory=$1
if [ ! -d $code_directory ]; then
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active July 4, 2024 13:00
Backend Architectures Keywords and References
@Magomogo
Magomogo / composer.json
Created September 5, 2012 09:13
Hamcrest at google code repository description for composer
{
"repositories": [
{
"type": "package",
"package": {
"name": "hamcrest/hamcrest",
"version": "1.1.0",
"dist": {
"type": "zip",
"url": "https://hamcrest.googlecode.com/files/hamcrest-php-1.1.0.zip"
@ziadoz
ziadoz / awesome-php.md
Last active July 13, 2024 05:29
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@isidromerayo
isidromerayo / PointOfSale2Test.java
Created January 24, 2012 18:06
Second test with Mockito - Point Of Sale - Hola TDD
@Test
public void onBarcode_search_catalog() throws Exception {
Catalog catalog = mock(Catalog.class);
Screen screen = mock(Screen.class);
PointOfSale pointOfSale = new PointOfSale(catalog, screen);
pointOfSale.onBarcode("123");
verify(catalog).search("123");
}
@rponte
rponte / advices.txt
Created December 16, 2011 15:04
some ways to show sql generated by hibernate
Setting the hibernate.show_sql to true tells hibernate to Write all SQL statements to console. This is an alternative to setting the log category org.hibernate.SQL to debug.
So even if you set this property to false, make sure that you don't have the following category defined (or configured to use a console appender):
log4j.logger.org.hibernate.SQL=DEBUG
Also, make sure that you don't set the hibernate.show_sql programmatically to true when instancing your Configuration object. Hunt something like this:
Configuration cfg = new Configuration().configure().
.setProperty("hibernate.show_sql", "true");
Note that the setProperty(String propertyName, String value) takes as first parameter the full name of a configuration property i.e. hibernate.show_sql, not just show_sql.