Skip to content

Instantly share code, notes, and snippets.

View hussachai's full-sized avatar

Hussachai Puripunpinyo hussachai

View GitHub Profile
<init-param>
<param-name>Service.Provider</param-name>
<param-value>stars</param-value>
</init-param>
<filter>
<description>
Provides essential configuration and request processing services
for the Stripes framework.
</description>
<display-name>Stripes Filter</display-name>
<filter-name>StripesFilter</filter-name>
<filter-class>net.sourceforge.stripes.controller.StripesFilter</filter-class>
<!-- REQUIRED init parameter for the Stripes Filter. -->
<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">
<persistence-unit name="default">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<properties>
<property name="hibernate.archive.autodetection" value="class" />
<property name="hibernate.connection.driver_class" value="org.hsqldb.jdbcDriver" />
<property name="hibernate.connection.url" value="jdbc:hsqldb:mem:bugzooky" />
#the custom javascript configuration for ckeditor
ckeditor.config=/ckeditor/myckconfig.js
#Filter file type based on its extension.
ckeditor.skipAllowedItemsCheck=false
#filebrowser can be either 'ofm' or 'standard'
ckeditor.defaulFileBrowser=ofm
ckeditor.connectors.prefix=
#basedir can have variable in these scopes - request,session,application
ckeditor.upload.basedir=/uploads/${userId}
#baseurl can have variable in these scopes - request,session,application
<ckeditor:editor id="text1" name="text1" height="400px" width="80%" toolbar="Basic" >
${text1}
</ckeditor>
<ckeditor:editor id="text2" name="text2" height="400px" width="80%" toolbar="Basic" >
${text2}
</ckeditor>
<ckeditor:editor id="text3" name="text3" height="400px" width="80%" toolbar="Basic" >
${text3}
</ckeditor>
<!--
<%@taglib prefix="ckeditor" uri="http://www.siberhus.com/taglibs/ckeditor"%>
<!--
Then put the following resources tag in <head>. The minified attribute indicates which
file will be used. If it is true, the minified javascript will be used instead of the
well-indented version.
-->
<ckeditor:resources minified="true" />
<!--
@SkipInjectionError
public class BugzookyBootstrap implements StarsBootstrap {
@PersistenceContext
private EntityManager em;
@Resource
private UserTransaction userTx;
@UrlBinding("/bugzooky/multiBug.action")
public class MultiBugActionBean extends BugzookyActionBean {
@Service(impl=BugManagerImpl.class)
@Autowired
@EJB
private BugManager bugManager;
...
}
@hussachai
hussachai / gist:d4e19e8840efeabaedce
Last active August 29, 2015 14:08
ActorToEnumerator
package pg.play
import play.api.libs.concurrent.Akka
import play.api.libs.concurrent.Execution.Implicits.defaultContext
import scala.concurrent.duration._
import akka.actor._
import play.api.test.FakeApplication
import play.api.libs.iteratee.Enumerator
import akka.pattern.ask
import scala.language.postfixOps
@hussachai
hussachai / SqlScriptRunner.java
Created April 9, 2015 07:49
SQL Script Runner
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.sql.Connection;
import java.sql.SQLException;
import java.sql.Statement;