Skip to content

Instantly share code, notes, and snippets.

@lauw
lauw / Business.cs
Last active April 3, 2022 10:39
ReboDb mapping helper to support different casing and default Table/Column attributes
using System.ComponentModel.DataAnnotations.Schema;
namespace UserApi
{
[Table("businesses")]
public class Business
{
[Column("id")]
@lauw
lauw / build.gradle
Created November 17, 2015 09:18 — forked from aalmiray/build.gradle
Simple Gradle build file for Asciidoctor + Diagram + PDF
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.asciidoctor:asciidoctor-gradle-plugin:1.5.2'
classpath 'org.asciidoctor:asciidoctorj-pdf:1.5.0-alpha.6'
classpath 'com.github.jruby-gradle:jruby-gradle-plugin:0.1.11'
classpath 'com.github.ben-manes:gradle-versions-plugin:0.7'
@lauw
lauw / SnappingRecyclerView.java
Created May 4, 2015 23:00
Snapping RecyclerView (Horizontal)
/*
* Copyright 2015 Laurens Muller.
*
* 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
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
public class HeroAnimation implements Serializable {
private int mLeft;
private int mTop;
private int mWidth;
private int mHeight;
private float mAlpha;
/**
* @param exampleView View to be animated to with Hero Animation
*/