Skip to content

Instantly share code, notes, and snippets.

Avatar

Jörn Huxhorn huxi

View GitHub Profile
@huxi
huxi / BuildTimestamp.gradle
Created Jun 30, 2015
Simple Gradle build listener to print a "Finished at: " similarly to Maven after the build has finished. Put this file into the ~/.gradle/init.d directory.
View BuildTimestamp.gradle
import org.gradle.BuildAdapter
import java.text.SimpleDateFormat
class FinishedAtBuildListener extends BuildAdapter {
private SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS")
void buildFinished(BuildResult result) {
println "Finished at: "+formatter.format(new Date())
}
}
View keybase.md

Keybase proof

I hereby claim:

  • I am huxi on github.
  • I am huxi (https://keybase.io/huxi) on keybase.
  • I have a public key whose fingerprint is AD87 86EE 62D6 4071 F7E8 A340 78A0 4B52 2984 7C26

To claim this, I am signing this object:

@huxi
huxi / gist:3323378214f2a4786220
Created May 28, 2014
gource 0.42 fails to build
View gist:3323378214f2a4786220
==> Downloading https://github.com/acaudwell/Gource/releases/download/gource-0.42/gource-0.42.tar.gz
Already downloaded: /Library/Caches/Homebrew/gource-0.42.tar.gz
==> Verifying gource-0.42.tar.gz checksum
tar xf /Library/Caches/Homebrew/gource-0.42.tar.gz
==> ./configure --disable-dependency-tracking --prefix=/usr/local/Cellar/gource/0.42 --without-x
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
checking for gawk... no
checking for mawk... no
@huxi
huxi / SynchronizedVsFairLock.java
Created Apr 30, 2014
Different synchronization variants compared
View SynchronizedVsFairLock.java
import java.util.concurrent.locks.*;
public class SynchronizedVsFairLock
{
public static void main(String args[])
throws InterruptedException
{
int delay=1;
if(args.length>0)
{
@huxi
huxi / gist:9807180
Created Mar 27, 2014
OneName Verification
View gist:9807180
I am +lilith on OneName. #verifymyonename
https://onename.io/lilith
@huxi
huxi / gist:9805666
Created Mar 27, 2014
OneName Verification
View gist:9805666
I am +huxi on OneName. #verifymyonename
https://onename.io/huxi
@huxi
huxi / PushoverAnnouncer.gradle
Last active Feb 19, 2016
Gradle announcer for https://pushover.net/Put this into ~/.gradle/init.d/PushoverAnnouncer.gradle
View PushoverAnnouncer.gradle
import org.gradle.api.plugins.announce.Announcer
import org.gradle.api.plugins.announce.internal.AnnouncingBuildListener
import org.slf4j.Logger
import org.slf4j.LoggerFactory
def pushoverAppToken = 'YourAppToken'
def pushoverUser = 'YourUserToken'
class PushoverAnnouncer implements Announcer {
private static final Logger logger = LoggerFactory.getLogger(PushoverAnnouncer)
View MagicalLand.java
public class MagicalLand {
public static void main(String[] args) {
for (int i = 0; i < (Math.random() * 500) + 2; i++) {
if (Unicorn.pat()) {
System.out.println("UNICORN #1: PAT THIS UNICORN ONCE");
}
}
for (int i = 0; i < (Math.random() * 500) + 2; i++) {
if (Unicorn.pat()) {
View MagicalLand.java
import java.util.*;
public class MagicalLand {
public static void main(String[] args) {
for (int i = 0; i < (Math.random() * 500) + 2; i++) {
if (Unicorn.pat()) {
System.out.println("UNICORN #1: PAT THIS UNICORN ONCE");
}
}
You can’t perform that action at this time.