Skip to content

Instantly share code, notes, and snippets.

View JSBerrocoso's full-sized avatar

JSBerrocoso JSBerrocoso

View GitHub Profile
@JSBerrocoso
JSBerrocoso / build.gradle
Created October 6, 2017 10:05
Aggregated Jacoco reports in a multi-project Gradle build
allprojects {
apply plugin: 'java'
apply plugin: 'jacoco'
repositories {
jcenter()
}
jacoco {
toolVersion = '0.7.1.201405082137'
@JSBerrocoso
JSBerrocoso / material text sizes.md
Created November 23, 2016 11:03 — forked from passsy/material text sizes.md
Material font sizes
@JSBerrocoso
JSBerrocoso / Sublime Text 3.x (after Build 309X) Raw
Created October 4, 2016 13:15
Sublime Text 3.x (after Build 309X)
—– BEGIN LICENSE —–
MinBan
Single User License
EA7E-806395
318133A3 8F202A61 B0DBB8EB 21E17D2E
97D540E6 34079344 54620650 71E47589
9EF87857 345F5042 0D728DD1 8D8C979D
6A4F4DD2 67BB0345 746CA297 515BDA91
6CEAB381 4DB56700 D77DCD14 977BD326
1AC309ED 0EB414B8 4730DA10 99DBD291
@JSBerrocoso
JSBerrocoso / Parse server install
Created June 21, 2016 12:15 — forked from Maarten-Wijnants/Parse server install
Parse server installation instructions
// Node.js 4.3
cd ~
sudo apt-get install curl
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash
nvm install 4.3
sudo apt-get remove node
// mongodb 3.0.9
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
@JSBerrocoso
JSBerrocoso / Main.java
Created January 27, 2016 18:45
PERMISSION 6.0 SAMPLE
/***
Copyright (c) 2015 CommonsWare, LLC
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 distributed under the
License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
OF ANY KIND, either express or implied. See the License for the specific
language governing permissions and limitations under the License.
From _The Busy Coder's Guide to Android Development_
public class VideoViewCustom extends VideoView {
private int mForceHeight = 0;
private int mForceWidth = 0;
public VideoViewCustom(Context context) {
super(context);
}
public VideoViewCustom(Context context, AttributeSet attrs) {
this(context, attrs, 0);
@JSBerrocoso
JSBerrocoso / CollapsingTitleLayout.java
Last active September 16, 2015 10:40 — forked from chrisbanes/CollapsingTitleLayout.java
CollapsingTitleLayout
/*
* 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
@JSBerrocoso
JSBerrocoso / MainActivity.java
Last active September 3, 2015 09:56 — forked from blackcj/MainActivity.java
Design support library with CoordinatorLayout, SwipeRefreshLayout and RecyclerView.
import android.os.Bundle;
import android.support.design.widget.AppBarLayout;
import android.support.design.widget.TabLayout;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.util.Log;
import com.blackcj.designsupportexample.adapters.RecyclerViewAdapter;
@JSBerrocoso
JSBerrocoso / EndlessRecyclerOnScrollListener.java
Last active September 1, 2015 11:52 — forked from ssinss/EndlessRecyclerOnScrollListener.java
Endless RecyclerView OnScrollListener
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
public abstract class EndlessRecyclerOnScrollListener extends RecyclerView.OnScrollListener {
public static String TAG = EndlessRecyclerOnScrollListener.class.getSimpleName();
private int previousTotal = 0; // The total number of items in the dataset after the last load
private boolean loading = true; // True if we are still waiting for the last set of data to load.
private int visibleThreshold = 5; // The minimum amount of items to have below your current scroll position before loading more.
int firstVisibleItem, visibleItemCount, totalItemCount;
package com.atomic.android.utils.views;
import android.content.Context;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.widget.AutoCompleteTextView;
/**
* Created by J. Santiago Berrocoso on 2/7/15.
* Atomic Internet S.L.