Skip to content

Instantly share code, notes, and snippets.

View mikeholler's full-sized avatar

Michael Holler mikeholler

View GitHub Profile
@mikeholler
mikeholler / build.gradle
Created February 3, 2014 22:04
Examples of different remote Maven repositories: Maven Central, public, and a password protected Sonatype Nexus repository. Make sure to ignore gradle.properties and version control gradle.properties.example.
repositories {
mavenCentral()
maven {
// via https://support.sonatype.com/entries/21596297.html
url "http://www.sonatypenexus.com/maven/"
credentials {
username mavenUser
password mavenPass
}
}
@mikeholler
mikeholler / settings.gradle
Created February 3, 2014 22:21
Change project artifact name.
rootProject.name = "artifact-name"
@mikeholler
mikeholler / build.gradle
Created February 3, 2014 22:26
Create "fat" jar containing dependencies.
jar {
// from http://fw-geekycoder.blogspot.com/2011/11/how-to-create-jar-with-dependencies-in.html
from { configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
manifest { attributes 'Main-Class': 'test.Main' }
}
@mikeholler
mikeholler / build.gradle
Created February 3, 2014 22:27
Create source jar build artifact.
task sourceJar(type: Jar) {
from sourceSets.main.allJava
}
@mikeholler
mikeholler / build.gradle
Created February 3, 2014 22:27
Create javadoc jar build artifact.
task javadocJar(type: Jar, dependsOn: javadoc) {
from javadoc.destinationDir
}
@mikeholler
mikeholler / build.gradle
Created February 3, 2014 22:29
Publish binary, source, and javadoc jars to maven repository requiring username/password credentials.
apply plugin: 'java'
apply plugin: 'maven-publish'
task sourceJar(type: Jar) {
// Specifies a JAR that contains source code from the library.
from sourceSets.main.allJava
}
task fatJar(type: Jar, dependsOn: build) {
// Creates a JAR that contains all dependencies in addition to the library.
@mikeholler
mikeholler / instructions.md
Created February 10, 2014 00:42
Create a screen cast GIF in Ubuntu.

First install this:

sudo apt-get install imagemagick mplayer gtk-recordmydesktop

those are the required stuff, ImageMagick, MPlayer and Desktop Recorder. Then use Desktop Recorder to capture a portion of the screen/application to use as the screencast. After the Desktop Recorder has saved the recording into an OGV video, MPlayer will be used to capture JPEG screenshots, saving them into the 'output' directory.

On a terminal:

@mikeholler
mikeholler / readme.md
Created February 10, 2014 15:43
A list of Android libraries.

Libraries

  • Otto event bus.
  • Picasso image downloading and caching library.
git tag -d 12345
git push origin :refs/tags/12345
" URL: http://vim.wikia.com/wiki/Example_vimrc
" Authors: http://vim.wikia.com/wiki/Vim_on_Freenode
" Description: A minimal, but feature rich, example .vimrc. If you are a
" newbie, basing your first .vimrc on this file is a good choice.
" If you're a more advanced user, building your own .vimrc based
" on this file is still a good idea.
"------------------------------------------------------------
" Features {{{1
"