Skip to content

Instantly share code, notes, and snippets.

View ffbit's full-sized avatar

D H ffbit

  • Here GmbH
  • Germany, Frankfurt am Main Area
View GitHub Profile
@ffbit
ffbit / User.java
Created August 13, 2012 20:32
A little JPA 2.0 example that implements naive Twitter User relationships.
package com.ffbit.twitter;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.Access;
import javax.persistence.AccessType;
import javax.persistence.Basic;
import javax.persistence.CascadeType;

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

I want to implement a simple simulator (Cellular automaton) and can use both java.util.concurrent.* or java.util.stream.* for parallel execution (later produces nicer code). With Java9 I want to execute on the GPU. Which package to use to prepare for GPU computation? Will there be a .parallelGPUStream()?
@ffbit
ffbit / Makefile
Created December 29, 2013 12:36 — forked from AlexDenisov/Makefile
all: calc
calc: parser lexer
CC lexer.c parser.c -o calc
lexer:
flex -o lexer.c lexer.l
parser:
bison -d -o parser.c parser.y
@ffbit
ffbit / build.gradle
Last active December 31, 2015 21:19 — forked from Dierk/build.gradle
apply plugin:'java'
apply plugin:'idea'
repositories { mavenCentral() }
dependencies {
testCompile 'junit:junit:4.11'
}
task makeDirs(description:'make all dirs for project setup') << {
@ffbit
ffbit / IntToBitesTest.java
Last active December 31, 2015 20:49
int to bytes
import org.junit.Test;
import java.util.Arrays;
public class IntToBitesTest {
@Test
public void intToBytes() throws Exception {
int n = 1234567890;
byte[] a = new byte[4];
@ffbit
ffbit / .vimrc
Created July 25, 2013 09:19
Set check spell on in vim
set spell
@ffbit
ffbit / gpg.txt
Created June 6, 2013 19:08
gpg export key
gpg --export -a
@ffbit
ffbit / plugin.sh
Created June 4, 2013 19:00
Create maven plugin
mvn archetype:generate \
-DgroupId=com.ffbit.maven.plugins \
-DartifactId=solr-maven-plugin \
-DarchetypeGroupId=org.apache.maven.archetypes \
-DarchetypeArtifactId=maven-archetype-mojo
/*
* Copyright (c) 2012, Luigi R. Viggiano
* All rights reserved.
*
* This software is distributable under the BSD license.
* See the terms of the BSD license in the documentation provided with this software.
*/
package org.aeonbits.owner;