Skip to content

Instantly share code, notes, and snippets.

Ignasi Busquets ignasi

Block or report user

Report or block ignasi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@FrancoisBlavoet
FrancoisBlavoet / GammaEvaluator.java
Last active Mar 19, 2018
Correct color interpolation
View GammaEvaluator.java
import android.animation.TypeEvaluator;
import android.animation.ValueAnimator;
import static java.lang.Math.pow;
public class GammaEvaluator implements TypeEvaluator {
private static final GammaEvaluator instance = new GammaEvaluator();
/**
@jeffarese
jeffarese / qhdpullrequest.js
Last active Aug 24, 2016
FHD & QHD width on Github pull requests
View qhdpullrequest.js
javascript:(function(){ var style = document.createElement(%27style%27), styleContent = document.createTextNode(%27.container { width: 1600px !important; } .timeline-comment-wrapper { width: 1380px !important; } .comment-holder{ max-width: none !important;} .discussion-item { width: 1300px !important; }%27); style.appendChild(styleContent ); var caput = document.getElementsByTagName(%27head%27); caput[0].appendChild(style); })();
@jgilfelt
jgilfelt / CurlLoggingInterceptor.java
Created Jan 9, 2016
An OkHttp interceptor that logs requests as curl shell commands
View CurlLoggingInterceptor.java
/*
* Copyright (C) 2016 Jeff Gilfelt.
*
* 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
@bishboria
bishboria / springer-free-maths-books.md
Last active Sep 5, 2019
Springer made a bunch of books available for free, these were the direct links
@keyboardr
keyboardr / HeadlessFragment.java
Last active Jul 4, 2019
A file template for creating a headless Fragment. The attach() methods add the fragment to the parent if it doesn't already exist and returns the attached fragment. The methods ensure that the parent implements the parent interface. If needed, parameters may be added to the attach() methods to supply fragment arguments.
View HeadlessFragment.java
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
import android.app.Activity;
import android.app.Fragment;
import android.app.FragmentManager;
#parse("File Header.java")
public class ${NAME} extends Fragment {
private static final String FRAG_TAG = ${NAME}.class.getCanonicalName();
@PomepuyN
PomepuyN / SettingsAdapter.java
Last active Jun 5, 2018
Functional example of WearableListView
View SettingsAdapter.java
public class SettingsAdapter extends WearableListView.Adapter {
private final Context context;
private final List<SettingsItems> items;
public SettingsAdapter(Context context, List<SettingsItems> items) {
this.context = context;
this.items = items;
}
View CollapsingTitleLayout.java
/*
* 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
@mheras
mheras / HeaderFooterRecyclerViewAdapter.java
Last active Sep 4, 2019
Header & footer support for RecyclerView.Adapter
View HeaderFooterRecyclerViewAdapter.java
public abstract class HeaderFooterRecyclerViewAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {
private static final int VIEW_TYPE_MAX_COUNT = 1000;
private static final int HEADER_VIEW_TYPE_OFFSET = 0;
private static final int FOOTER_VIEW_TYPE_OFFSET = HEADER_VIEW_TYPE_OFFSET + VIEW_TYPE_MAX_COUNT;
private static final int CONTENT_VIEW_TYPE_OFFSET = FOOTER_VIEW_TYPE_OFFSET + VIEW_TYPE_MAX_COUNT;
private int headerItemCount;
private int contentItemCount;
private int footerItemCount;
@alexjlockwood
alexjlockwood / ActivityTransitionCoordinator.java
Last active Aug 29, 2015
ActivityTransitionCoordinator.java
View ActivityTransitionCoordinator.java
package android.app;
import android.content.Context;
import android.graphics.Matrix;
import android.graphics.Rect;
import android.graphics.RectF;
import android.os.Bundle;
import android.os.Handler;
import android.os.Parcelable;
import android.os.ResultReceiver;
@donnfelker
donnfelker / CircularTransformation.java
Last active May 10, 2017
Picasso and CircularTransform Example
View CircularTransformation.java
import android.graphics.*;
import com.squareup.picasso.Transformation;
/**
* Transforms an image into a circle representation. Such as a avatar.
*/
public class CircularTransformation implements Transformation
{
int radius = 10;
You can’t perform that action at this time.