Skip to content

Instantly share code, notes, and snippets.

@johncarl81
johncarl81 / .bashrc
Created February 27, 2018 21:59
pretty git log
alias gl='git log --oneline --graph --decorate --all'
alias gd='git branch --merged | egrep -v "(^\*|master|dev)" | xargs git branch -d'
@Rexee
Rexee / RealmList.java
Last active August 3, 2018 01:38
Parceler and RealmList
@Parcel(implementations = { CountryRealmProxy.class },
value = Parcel.Serialization.FIELD,
analyze = { Country.class })
public class Country extends RealmObject {
@ParcelPropertyConverter(RealmListParcelConverter.class)
public RealmList<RealmString> languages;
}
public class RealmListParcelConverter
implements TypeRangeParcelConverter<RealmList<? extends RealmObject>,
@cmelchior
cmelchior / BarListParcelConverter.java
Last active August 29, 2019 09:46
Using Parceler 1.0.3 with Realm
// Specific class for a RealmList<Bar> field
public class BarListParcelConverter extends RealmListParcelConverter<Bar> {
@Override
public void itemToParcel(Bar input, Parcel parcel) {
parcel.writeParcelable(Parcels.wrap(input), 0);
}
@Override
public Bar itemFromParcel(Parcel parcel) {
@bodiam
bodiam / asciidoc.css
Last active August 29, 2015 14:19 — forked from imjasonh/markdown.css
Render HTML as unrendered Asciidoc - See http://jsbin.com/mifepiqosa/1/edit?html,css,output
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
import android.app.Activity;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
@chrisbanes
chrisbanes / FloatLabelLayout.java
Last active March 15, 2024 06:39
FloatLabelLayout
/*
* Copyright 2014 Chris Banes
*
* 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
@rob-murray
rob-murray / add_intellij_launcer
Last active April 10, 2024 15:42
Add Intellij launcher shortcut and icon for ubuntu
// create file:
sudo vim /usr/share/applications/intellij.desktop
// add the following
[Desktop Entry]
Version=13.0
Type=Application
Terminal=false
Icon[en_US]=/home/rob/.intellij-13/bin/idea.png
Name[en_US]=IntelliJ