Skip to content

Instantly share code, notes, and snippets.

View kevingo's full-sized avatar
🏠
Working from home

kevingo kevingo

🏠
Working from home
View GitHub Profile
@kevingo
kevingo / load_modules
Created November 1, 2011 17:50
apache load balancer load modules
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_balancer_module modules/mod_proxy_balancer.so
LoadModule proxy_http_module modules/mod_proxy_http.so
@kevingo
kevingo / gist:2157253
Created March 22, 2012 09:05
Spring Bean Metadata
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
<bean id="helloWorld" class="HelloWorld" destroy-method="destroy" init-method="init">
<property name="message" value="Hello World!"/>
</bean>
</beans>
@kevingo
kevingo / gist:2224171
Created March 28, 2012 06:19
XBasicDataSource
public class XBasicDataSource extends BasicDataSource {
@Override
public synchronized void close() throws SQLException {
DriverManager.deregisterDriver(DriverManager.getDriver(url));
super.close();
}
}
@kevingo
kevingo / gist:2928730
Created June 14, 2012 07:28
JPA - createNativeQuery
Query q = JPA.em().createNativeQuery("SELECT * from post p");
List<Post> posts = (List<Post>)q.getResultList();
@kevingo
kevingo / gist:2928776
Created June 14, 2012 07:38
JPA - createNativeQuery with resultClass
Query q = JPA.em().createNativeQuery("SELECT * from post p, Post.class");
List<Post> posts = (List<Post>)q.getResultList();
@kevingo
kevingo / gist:3018448
Created June 29, 2012 14:58
git for commit play app to heroku
git init
git add app conf lib public test
git commit -m init
@kevingo
kevingo / gist:3018457
Created June 29, 2012 15:00
create a new app on heroku
heroku create -s cedar
@kevingo
kevingo / gist:3018462
Created June 29, 2012 15:01
push app to heroku
git push heroku master
@kevingo
kevingo / gist:3018539
Created June 29, 2012 15:17
play app db conf on heroku when using mysql
%prod.db=${CLEARDB_DATABASE_URL}
%prod.jpa.dialect=org.hibernate.dialect.MySQLDialect
%prod.jpa.ddl=update
@kevingo
kevingo / gist:3186805
Created July 27, 2012 08:16
git remote rm heroku
git remote rm heroku