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 the contents of ~/.path into $PATH, if ~/.path exists. ~/.path should be a file | |
| # consisting of one path on each line, such as: | |
| # | |
| # ~$ cat ~/.path | |
| # # vim: ft=sh | |
| # ~/usr/bin | |
| # /opt/local/bin | |
| # ... etc ... | |
| # | |
| # Note that comments begin with a hash (#). |
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 org.apache.tools.ant.filters.ReplaceTokens | |
| // Configure default profile | |
| if (!project.hasProperty("profile")) { | |
| project.set("profile", "dev") | |
| } | |
| // Load application properties by profile | |
| def props = new Properties() | |
| file("../application-${profile}.properties").withInputStream { |
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
| package com.squareup.alcatraz.auth; | |
| import com.google.common.base.Optional; | |
| import com.unboundid.ldap.sdk.Filter; | |
| import com.unboundid.ldap.sdk.LDAPConnection; | |
| import com.unboundid.ldap.sdk.LDAPException; | |
| import com.unboundid.ldap.sdk.ResultCode; | |
| import com.unboundid.ldap.sdk.SearchRequest; | |
| import com.unboundid.ldap.sdk.SearchResult; | |
| import com.unboundid.ldap.sdk.SearchResultEntry; |
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 org.gradle.api.NamedDomainObjectContainer | |
| import org.gradle.api.Plugin | |
| import org.gradle.api.Project | |
| import org.gradle.api.DefaultTask | |
| import org.gradle.api.tasks.TaskAction | |
| import liquibase.integration.commandline.Main | |
| apply plugin: LiquibasePlugin | |
| buildscript { |
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: 'scala' | |
| // For those using Eclipse or IntelliJ IDEA | |
| apply plugin: 'eclipse' | |
| apply plugin: 'idea' | |
| def findPlay20(){ | |
| def pathEnvName = ['PATH', 'Path'].find{ System.getenv()[it] != null } | |
| for(path in System.getenv()[pathEnvName].split(File.pathSeparator)){ | |
| for(playExec in ['play.bat', 'play.sh', 'play']){ |
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
| 1) Create a branch with the tag | |
| git branch {tagname}-branch {tagname} | |
| git checkout {tagname}-branch | |
| 2) Include the fix manually if it's just a change .... | |
| git add . | |
| git ci -m "Fix included" | |
| or cherry-pick the commit, whatever is easier | |
| git cherry-pick {num_commit} | |
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
| package com.sample.dao.impl | |
| import java.util.List; | |
| import javax.persistence.EntityManager; | |
| import javax.persistence.Query; | |
| import org.springframework.beans.factory.annotation.Autowired; | |
| import org.springframework.beans.factory.annotation.Qualifier; | |
| import org.springframework.stereotype.Component; |
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
| # Get latest Sun Java SDK in v6 from Oracle | |
| wget http://download.oracle.com/otn-pub/java/jdk/6u31-b04/jdk-6u31-linux-x64-rpm.bin | |
| # make it exec | |
| chmod +x jdk-6u31-linux-x64-rpm.bin | |
| # Install Java | |
| sudo ./jdk-6u31-linux-x64-rpm.bin | |
| # Check if the default java version is set to sun jdk |
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
| package yourpackage; | |
| import static org.mockito.Mockito.*; | |
| import java.util.HashMap; | |
| import org.hibernate.SessionFactory; | |
| import org.hibernate.classic.Session; | |
| import org.hibernate.dialect.MySQL5Dialect; | |
| import org.hibernate.dialect.function.SQLFunctionRegistry; |
NewerOlder