Skip to content

Instantly share code, notes, and snippets.

View meierjan's full-sized avatar
🐢
I like turtles.

Jan Meier meierjan

🐢
I like turtles.
View GitHub Profile
@meierjan
meierjan / TerminalStatusFilterTest.java
Created February 9, 2017 10:42
Terminal Status Test Suite
package net.nextbike.serviceapp.domain.mapfilters.filters;
import net.nextbike.serviceapp.domain.mapfilters.helper.TestFilter;
import net.nextbike.serviceapp.domain.model.Place;
import net.nextbike.serviceapp.domain.model.Terminal;
import org.junit.Before;
import org.junit.Test;
import static net.nextbike.serviceapp.domain.model.MapPlace.MarkerType.GREEN;
import static net.nextbike.serviceapp.domain.model.MapPlace.MarkerType.RED;
@meierjan
meierjan / README.md
Last active September 19, 2017 11:59 — forked from krzysztof-miemiec/Album.java
List parsing done with LoganSquare and Realm database.

First off props to @rs411.

How to use this? If you just c&p this as @peterbetos pointed out you get a

TypeConverter classes must have a non-private zero argument constructor.

How to solve this? As I am using this for diffent types like lets say RealmList<UserEntity>. I did the following:

@meierjan
meierjan / GeneratorHelper.java
Created October 28, 2015 11:44
A helper class that helps you speed up creating greenDAO classes.
import java.util.HashMap;
import java.util.Map;
import de.greenrobot.daogenerator.Entity;
import de.greenrobot.daogenerator.Property;
/**
* Created by jmeier on 28.10.15.
*/
class Feature < ActiveRecord::Base
has_many :flat_features
has_many :flats, through: :flat_features
end
class FlatFeature < ActiveRecord::Base
belongs_to :flat
belongs_to :feature
end
<?php
class Colors {
private $foreground_colors = array();
private $background_colors = array();
public function __construct() {
// Set up shell colors
$this->foreground_colors['black'] = '0;30';
$this->foreground_colors['dark_gray'] = '1;30';
$this->foreground_colors['blue'] = '0;34';
package de.hstrier.rockyou;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.Map;
@meierjan
meierjan / owncloud_workaround.php
Created May 10, 2013 13:03
Background-Info: The main problem is the FileSystem method Filesystem::searchByMime() is only searching threw your own Data. Files that are shares with you aren't searched. As my understanding in OwnCloud logic isn't that deep I decided myself to make this "quick and dirty" approach (that is working fine for me).
<?php
/**
* Workaround for OWNCLOUD that puts SHARED MUSIC into your Player
* -> https://github.com/owncloud/apps/issues/855
*
* @author: jan1337z <[email protected]>
*
* -> modifications are made in BASE_FOLDER/apps/media/lib/scanner.php
*
* To Do (in scanner.php)