Skip to content

Instantly share code, notes, and snippets.

@ming4883
ming4883 / Invoke NDK build
Created May 13, 2015 12:00
Manual invoke ndk-build for each BuildType in Android Studio
def readLocalProp () {
Properties properties = new Properties()
properties.load(project.rootProject.file('local.properties').newDataInputStream())
return properties
}
def invokeNDKBuild (debuggable, cleaning) {
def properties = readLocalProp()
def ndkDir = properties.getProperty('ndk.dir')
def osName = System.getProperty('os.name').toLowerCase()
@mediavrog
mediavrog / enable-volley-verbose-logging
Last active March 26, 2017 16:58
Enable verbose logging in Google Volley networking library
# (42f63b0de7318fe1 is a device id)
adb -s 42f63b0de7318fe1 shell setprop log.tag.Volley VERBOSE

Parse -> LeanCloud 文件迁移工具

注意:这个工具是用来导入到中国区节点的

依赖: gevent、requests

Ubuntu 可以 # apt-get install python-gevent python-requests

@ec84b4
ec84b4 / gist:d56c00fb5fd2dfaf279b
Last active June 26, 2018 06:22
recycler view header adapter
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.TextView;
/**
* Created by khaled bakhtiari on 10/26/2014.
* <a href="http://about.me/kh.bakhtiari">
*/
@maerzbow
maerzbow / EnsureEncoding.java
Last active November 16, 2018 00:19
EnsureEncoding.java
import static java.nio.charset.StandardCharsets.ISO_8859_1;
import static java.nio.charset.StandardCharsets.UTF_16BE;
import static java.nio.charset.StandardCharsets.UTF_16LE;
import static java.nio.charset.StandardCharsets.UTF_8;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharacterCodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
@AndrewReitz
AndrewReitz / ImmutableList.java
Last active December 25, 2018 22:56
Immutable List Stuff
import android.support.annotation.NonNull;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.RandomAccess;
@cketti
cketti / android-26-sources.md
Last active August 14, 2019 12:08
Build your own android-26 sources

If you are annoyed that "Sources for Android 26" are not yet available via SDK manager, this might be for you:

  1. Collect source files
mkdir android-sdk-source-build
cd android-sdk-source-build

mkdir -p frameworks/base
@marcelpinto
marcelpinto / ControllableAppBarLayout.java
Last active December 12, 2019 03:42 — forked from blipinsk/ControllableAppBarLayout.java
An extension of Android AppBarLayout, that allows to programatically change the CollapsibleToolbarLayout state and receive state changes (collapsed, expanded and idle)
package com.eatfirst.android.ui.custom;
/**
* Copyright 2015 Bartosz Lipinski
*
* 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
@silvestrpredko
silvestrpredko / InterceptRequest.java
Last active April 10, 2020 13:48
Append parameters to POST in Intercept(OkHttp)
/**
* @param parameter - this is string that contains parameters for Http POST
* @param request - old Request
* @return - new {@link Request} with additional parameters
* */
public static Request interceptRequest(@NotNull Request request, @NotNull String parameter)
throws IOException {
ByteArrayOutputStream baos = new ByteArrayOutputStream();

Hello,

I attended WWDC this year, and overall it was a fantastic experience. I would, however, like to give some feedback on one particular aspect of the conference.

Before I begin, I understand that it would be easy to brush off my feedback as coming from just some grumpy English guy, but I genuinely believe this is important feedback. Please do read until the end.

I would like to ask that the cheering, whooping, clapping and hollering by conference staff is toned down.

I'm a person that would describe myself as "slightly introverted". I cannot begin to describe how deeply uncomfortable it was to walk into the registration room on Sunday to multiple employees cheering and clapping at me, trying to give me high fives. I understand the want to make people excited, but this needs to have its limits. During the conference, I got cheered and high-fived pretty much the entire week for things like: