Skip to content

Instantly share code, notes, and snippets.

Avatar

John Lombardo johnnylambada

View GitHub Profile
View AnkoRecyclerViewAdapter.kt
abstract class AnkoRecyclerViewAdapter<Model : Any, AnkoView : AnkoComponent<ViewGroup>, ViewHolder : RecyclerView.ViewHolder> : RecyclerView.Adapter<ViewHolder>() {
abstract val data: List<Model> // Data list
abstract val ankoView: AnkoView // Layout as AnkoComponent<ViewGroup>
abstract fun ViewHolder.setup(model: Model) // setup model from ViewHolder
abstract val onItemClickListenerUnit: (Model) -> Unit // Item Click Listener
override fun onBindViewHolder(holder: ViewHolder, position: Int) {
holder.setup(data[position])
holder.itemView.setOnClickListener {
@johnnylambada
johnnylambada / Alerts.java
Created Nov 17, 2015
An approach for dealing with Marshmallow permissions
View Alerts.java
package base.util;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import app.R;
import retrofit.RetrofitError;
import retrofit.mime.TypedByteArray;
@johnnylambada
johnnylambada / README.md
Last active Dec 17, 2015
rails + heroku + postgress + devise
View README.md

rails + heroku + postgress + devise

This is how I actually got all this stuff to work together. It'll attrophy over time but as of June 2013 it works. Maybe I'll keep it up to date.

-- john@lombardos.org

On the shoulders...

Generally, this document is a a mashup of the following tutorials and pages...

@johnnylambada
johnnylambada / heroku_django.md
Last active Dec 16, 2015
heroku + Django + tutorials
View heroku_django.md

Django + Heroku + Django_tutorials + S3

This is how I actually got all this stuff to work together. It'll attrophy over time but as of May 2013 it works. Maybe I'll keep it up to date.

-- john@lombardos.org

On the shoulders...

Generally, this document is a a mashup of the following tutorials.