Skip to content

Instantly share code, notes, and snippets.

Leonardo Rossetto leonardoxh

Block or report user

Report or block leonardoxh

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
leonardoxh / DateExtensions.kt
Last active May 29, 2019
Simple timezone calculations
View DateExtensions.kt
import java.util.Date
import java.uti.TimeZone
/** Local date to UTC */
val Date.utc: Date get() = Date(time + TimeZone.getDefault().rawOffset)
/** UTC date to local date */
val Date.local: Date get() = Date(time - TimeZone.getDefault().rawOffset)
leonardoxh / maven_push.gradle
Created Jan 12, 2015
This is my default maven push gradle for my java projects
View maven_push.gradle
apply plugin: 'maven'
apply plugin: 'signing'
def isReleaseBuild() {
return VERSION_NAME.contains("SNAPSHOT") == false
def getRepositoryUrl() {
if(isReleaseBuild()) {
leonardoxh / Default_git_ignore
Last active Aug 29, 2015
This is my default git ignore for my java/android projects
View Default_git_ignore
# Custom
# Ant
* Copyright 2014 Chris Banes
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* Unless required by applicable law or agreed to in writing, software
You can’t perform that action at this time.