This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Session s = (Session)em.getDelegate(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<property name="hibernate.cache.provider_class" value="net.sf.ehcache.hibernate.EhCacheProvider" /> | |
<property name="hibernate.cache.use_query_cache" value="true" /> | |
<property name="hibernate.cache.use_second_level_cache" value="true" /> | |
<!-- not used in this version 3.3 --> | |
<!-- <property name="hibernate.cache.provider_class" value="org.hibernate.cache.hibernate.EhCacheProvider" /> --> | |
<!-- <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.ehcache.SingletonEhCacheRegionFactory"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to_date('25-SEP-2015 10:42:00', 'DD-MON-YYYY HH:MI:SS') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rhc scp your-appname download . app-root/data/export-filename.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#$OPENSHIFT_NOSQL_DB_PORT was changed on OpenShift at some point where NOSQL is now the db type, like MONGODB | |
#so for MongoDB use $OPENSHIFT_MONGODB_DB_PORT | |
mongoexport --host $OPENSHIFT_NOSQL_DB_HOST--port $OPENSHIFT_NOSQL_DB_PORT --authenticationDatabase admin --username admin --password yourpassword --db your-app-name --collection your-collection-name --out export-filename.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#per post: http://stackoverflow.com/questions/19512749/how-to-capture-soap-messages-from-a-tomcat-java-app-to-an-external-server | |
-Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=8888 -DproxySet=true -DproxyHost=127.0.0.1 -DproxyPort=8888 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"partial/ajax".equals(httpRequest.getHeader("Faces-Request") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
httpResponse.setContentType("text/xml"); | |
httpResponse.getWriter() | |
.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>") | |
.printf("<partial-response><redirect url=\"%s\"></redirect></partial-response>", "/the/url"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
response.readEntity(String.class); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for f in `find -E . -regex ".*ext1|.*ext2|.*ext3"` | |
do | |
line=$(head -n 1 $f) | |
if [[ $line =~ TextAtStartOfLine:[[:space:]]*([[:digit:]]+) ]]; then | |
echo "${BASH_REMATCH[0]}" # print whole match | |
echo "${BASH_REMATCH[1]}" # print 1st group match | |
fi | |
done |