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
docker ps| grep <container-name> | awk '{print $1}' | xargs docker logs -f $1 |
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
/** | |
* Example of Spring 4 Properties Java Configuration, | |
* with a Database Properties table to store most values | |
* and a small application.properties file too. | |
* The Database table will take precedence over the properties file with this setup | |
*/ | |
@Configuration | |
@PropertySource(value = { "classpath:application.properties" }, ignoreResourceNotFound=true) | |
public class SpringPropertiesConfig { | |
private static final Logger log = LoggerFactory.getLogger(SpringPropertiesConfig.class); |
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
git branch | grep -v "master" | grep -v "eureka" | xargs git branch -D |
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
// read a value | |
Object value = new PropertyDescriptor(property, clazz).getReadMethod().invoke(object); | |
//write a value | |
/** | |
* | |
* @param className | |
* @param valueToSet | |
* @param property | |
* @throws Exception |
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
// Released under MIT license: http://www.opensource.org/licenses/mit-license.php | |
$('[placeholder]').focus(function() { | |
var input = $(this); | |
if (input.val() == input.attr('placeholder')) { | |
input.val(''); | |
input.removeClass('placeholder'); | |
} | |
}).blur(function() { | |
var input = $(this); |
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
apply plugin: 'java' | |
apply plugin: 'gradle-one-jar' | |
apply plugin: 'application' | |
// Use Java 8 by default | |
sourceCompatibility = 1.8 | |
targetCompatibility = 1.8 | |
version = '1.0' | |
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8' |
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
WARN [2015-07-14 02:20:07,314] org.eclipse.jetty.util.component.AbstractLifeCycle: FAILED i.d.j.MutableServletContextHandler@7c8326a4{/,null,STARTING}: java.lang.NoClassDefFoundError: org/glassfish/jersey/spi/ScheduledThreadPoolExecutorProvider | |
! java.lang.ClassNotFoundException: org.glassfish.jersey.spi.ScheduledThreadPoolExecutorProvider | |
! at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_45] | |
! at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_45] | |
! at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) ~[na:1.8.0_45] | |
! at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_45] | |
! ... 82 common frames omitted | |
! Causing: java.lang.NoClassDefFoundError: org/glassfish/jersey/spi/ScheduledThreadPoolExecutorProvider | |
! at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.8.0_45] | |
! at java.lang.ClassLoader.defineClass(ClassLoader.java:760) ~[na:1.8.0_45] |
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 ca.nazim.NazimApplication; | |
import ca.nazim.NazimConfiguration; | |
import ca.nazim.auth.NazimUser; | |
import io.dropwizard.jdbi.DBIFactory; | |
import io.dropwizard.testing.junit.DropwizardAppRule; | |
import org.junit.Assert; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import org.skife.jdbi.v2.DBI; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.example</groupId> | |
<artifactId>root-pom</artifactId> | |
<version>1.0-SNAPSHOT</version> | |
<packaging>pom</packaging> | |
<name>Root POM</name> | |
<url>http://git.example.com/rootpom.git</url> |
NewerOlder