This file contains hidden or 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
@Configuration | |
@PropertySource(CoreSpringConfig.PROPERTIES) | |
public class WebappSpringConfig { | |
@Autowired | |
private Environment environment; | |
/** | |
* 'springSecurityFilterChain' is Magic ID and it is required by Spring Security DelegatingFilterProxy in web.xml | |
* |
This file contains hidden or 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
# Assume I'm working inside feature-branch and I want to sync changes from sprint-branch | |
# which is already ahead and future merge back might become difficult due to ammount of changes | |
# I'm inside my feature-branch | |
git checkout feature-branch | |
# commit and push branch changes... | |
git commit | |
git push |
This file contains hidden or 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
<configuration debug="true" scan="true" scanPeriod="10 seconds"> | |
<!-- | |
Put into your rsyslog server's /etc/rsyslog.conf | |
if $programname == 'mycoolapp' then /var/log/mycoolapp/mycoolapp.log | |
--> | |
<!-- http://logback.qos.ch/manual/appenders.html#SyslogAppender --> | |
<appender name="SYSLOG" class="ch.qos.logback.classic.net.SyslogAppender"> | |
<syslogHost>logs.mycompany.com</syslogHost> | |
<facility>LOCAL0</facility> | |
<suffixPattern> mycoolapp:%-10t|%-5p|%c{40}: %m</suffixPattern> |
This file contains hidden or 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
-- | |
-- In your Quartz properties file, you'll need to set | |
-- org.quartz.jobStore.driverDelegateClass = org.quartz.impl.jdbcjobstore.StdJDBCDelegate | |
-- | |
-- | |
-- By: Ron Cordell - roncordell | |
-- I didn't see this anywhere, so I thought I'd post it here. This is the script from Quartz to create the tables in a MySQL database, modified to use INNODB instead of MYISAM. | |
-- anthavio - Replaced VARCHAR(1) with BOOLEAN |
This file contains hidden or 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
<profiles> | |
<profile> | |
<id>openshift</id> | |
<build> | |
<pluginManagement> | |
<plugins> | |
<!-- | |
Git repo is checked out into /var/lib/openshift/52d5741450044610e8000284/app-root/runtime/repo | |
and Maven is started in this directory. |
This file contains hidden or 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
/** | |
{ "f1" : "hello", | |
"f2" : [1, "2", 3], | |
"f3" : { "n" : 5.5 } | |
} | |
*/ | |
String json = new SimpleJsonBuilder() | |
.object() //switch to object context 1 | |
.field("f1", "hello") | |
.array("f2") //switch to array context |
This file contains hidden or 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
import java.net.HttpURLConnection; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
import java.net.SocketTimeoutException; | |
import java.net.URL; | |
import org.testng.Assert; | |
import org.testng.annotations.AfterClass; | |
import org.testng.annotations.BeforeClass; | |
import org.testng.annotations.Test; |
NewerOlder