Skip to content

Instantly share code, notes, and snippets.

@David402
David402 / maven-push.gradle
Created April 7, 2015 15:45
An gradle file to release project to Maven server
apply plugin: 'maven'
apply plugin: 'signing'
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
}
def getReleaseRepositoryUrl() {
return hasProperty('RELEASE_REPOSITORY_URL') ? RELEASE_REPOSITORY_URL
: "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
@David402
David402 / pretty terminal for git auto-completion
Last active December 9, 2015 06:55
Snippet to make terminal support git auto-complete and color (~/.profile)
#
# Make custom colorful Git prompt
#
function git_branch {
git symbolic-ref HEAD 2> /dev/null | sed 's/refs\/heads\/\(.*\)/\1/'
}
function git_prompt {
git=$(git_branch)
if test $git; then
echo " $git>"