Skip to content

Instantly share code, notes, and snippets.

@jgilfelt
jgilfelt / CurlLoggingInterceptor.java
Created January 9, 2016 15:34
An OkHttp interceptor that logs requests as curl shell commands
/*
* 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
@rocboronat
rocboronat / RippleDelayedRunner.java
Last active November 29, 2020 12:42
A simple way to call the common new Handler().postDelayed(..., time);
package com.fewlaps.android.quitnow.base.customview;
import android.os.Handler;
import android.view.View;
/**A simple way to call the common new Handler().postDelayed(..., time);
*
* Created by Roc Boronat on 12/12/2014.
*/
public class RippleDelayedRunner implements View.OnClickListener {
@douo
douo / FloatingActionMenu.java
Created June 23, 2015 08:01
FloatingActionMenu build by android support FloatingActionButton
package com.diaoser.tmr.view;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
@AleBles
AleBles / ScaleManager.js
Last active January 15, 2019 10:28
Phaser v3 temp (css) scale amanger
class ScaleManager {
constructor(canvas, isMobile) {
this.canvas = canvas;
this.mobile = isMobile;
window.addEventListener('resize', () => {
this.resize(this.canvas);
if (this.mobile) {
if (window.innerWidth < window.innerHeight) {
@Sloy
Sloy / build.gradle
Last active August 29, 2015 14:15
Dex Count Gradle
buildscript {
repositories {
jcenter()
maven { url 'http://dl.bintray.com/sloy/maven'} //<- only needed while jcenter refresh to the new version
}
dependencies {
classpath 'com.sloydev:dexcountprettify-plugin:0.1.2'
}
}