Skip to content

Instantly share code, notes, and snippets.

View jfsso's full-sized avatar
🍼
🚼

João Orui jfsso

🍼
🚼
  • Drivemode, Inc.
  • Tokyo, Japan
View GitHub Profile
@donnfelker
donnfelker / OrderActivity.java
Last active November 22, 2019 23:46
RxJava Bound Service AIDL Abstraction
package com.donnfelker.rxexample;
import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import rx.Subscriber;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;
@JakeWharton
JakeWharton / Oauth1SigningInterceptor.java
Last active November 27, 2023 10:04
An OkHttp interceptor which does OAuth1 signing. Requires Guava and Java 8, although those dependencies wouldn't be too hard to break if you didn't have them.
/*
* Copyright (C) 2015 Jake Wharton
*
* 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
@benvium
benvium / apk-change-version-number.md
Created February 20, 2015 16:14
How to change the version number on an existing APK without re-building

This requires the latest version of apktool.

apktool d $APK_PATH -o $OUTPUT_FOLDER

# Open the apktool.yml text file
# Alter the versionCode and versionName entries

# now rebuild!
apktool build $OUTPUT_FOLDER 
@rtrouton
rtrouton / gist:ffc22da3c36c61aad0fe
Last active December 3, 2020 08:39
Casper extension attribute for checking AppleCare warranty status
#!/bin/sh
# this script was written to query apple's service database to determine warranty coverage
# base on a system's serial number. This updated version stores the information locally so
# as not to have to query Apple's website repeatedly.
# author: Andrew Thomson
# date: 5/30/2013
@dliggat
dliggat / mixpanel_export.rb
Last active January 14, 2017 14:41
Export data from Mixpanel
#!/usr/bin/env ruby
require 'active_support/time'
require 'digest'
API_KEY = 'YOUR KEY'
API_SECRET = 'YOUR SECRET'
args = {
'from_date' => Date.new(2014,9,1).iso8601,
@JakeWharton
JakeWharton / README.md
Last active May 10, 2018 08:39
A workaround for Android "L" Okio packaging problem. Place all of the following in a `libs/` folder.

JarJar'd OkHttp Dependencies

Due to a bug in the packaging of Android OS "L", dependencies which reference Okio need to be repackaged.

For more information see square/okhttp#967

Usage

@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
@wbroek
wbroek / genymotionwithplay.txt
Last active February 12, 2024 03:22
Genymotion with Google Play Services for ARM
NOTE: Easier way is the X86 way, described on https://www.genymotion.com/help/desktop/faq/#google-play-services
Download the following ZIPs:
ARM Translation Installer v1.1 (http://www.mirrorcreator.com/files/0ZIO8PME/Genymotion-ARM-Translation_v1.1.zip_links)
Download the correct GApps for your Android version:
Google Apps for Android 6.0 (https://www.androidfilehost.com/?fid=24052804347835438 - benzo-gapps-M-20151011-signed-chroma-r3.zip)
Google Apps for Android 5.1 (https://www.androidfilehost.com/?fid=96042739161891406 - gapps-L-4-21-15.zip)
Google Apps for Android 5.0 (https://www.androidfilehost.com/?fid=95784891001614559 - gapps-lp-20141109-signed.zip)
@cdodd
cdodd / install-squid.sh
Last active June 17, 2022 15:08
Install a basic squid proxy with authentication on Centos 6 x64. Just modify the variables at the top and run the script on a clean system.
#!/bin/sh
PROXY_USER=user
PROXY_PASS=password
PROXY_PORT=3128
# Clear the repository index caches
yum clean all
# Update the operating system
@JakeWharton
JakeWharton / HierarchyTreeChangeListener.java
Last active March 16, 2022 02:17
A hierarchy change listener which recursively monitors and entire tree of views. Apache 2.
import android.view.View;
import android.view.ViewGroup;
/**
* A {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} which recursively
* monitors an entire tree of views.
*/
public final class HierarchyTreeChangeListener implements ViewGroup.OnHierarchyChangeListener {
/**
* Wrap a regular {@link ViewGroup.OnHierarchyChangeListener hierarchy change listener} with one