Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
# | |
# Add Google Analytics tracking code to HTML response | |
# | |
# Usage: | |
# set $tracking_id 'UA-12345678-9'; | |
# include incl/analytics.conf; | |
# | |
# It needs nginx compiled with option --with-http_sub_module. | |
# Uses optimized GA code from: http://mathiasbynens.be/notes/async-analytics-snippet | |
# |
launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist | |
launchctl unload /System/Library/LaunchAgents/com.apple.nsurlsessiond.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlsessiond.plist | |
sudo launchctl unload /System/Library/LaunchDaemons/com.apple.nsurlstoraged.plist |
#!/bin/sh | |
# remove image by pattern | |
docker images | grep "^pattern" | awk '{print $3}' | xargs docker rmi | |
# remove exited containers | |
docker ps -q -f status=exited | xargs docker rm | |
# get container/image label | |
docker-label () { # [container/image] [label] |
import android.os.Bundle; | |
import android.support.multidex.MultiDex; | |
import android.support.test.runner.AndroidJUnitRunner; | |
public class MultiDexJunitRunner extends AndroidJUnitRunner { | |
@Override | |
public void onCreate(Bundle arguments) { | |
MultiDex.install(getTargetContext()); | |
super.onCreate(arguments); | |
} |
export PATH="/opt/android-sdk-linux/tools:${PATH}" |
/* | |
* Copyright (C) 2012 Sebastian Kaspari | |
* | |
* 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 |
.gradle | |
/local.properties | |
/.idea/workspace.xml | |
/.idea/libraries | |
/build | |
/captures | |
.DS_Store | |
Thumbs.db |
// see: http://stackoverflow.com/a/823966/670623 | |
public static Bitmap decodeFile(File f, int size) { | |
try { | |
// Decode image size | |
BitmapFactory.Options opts1 = new BitmapFactory.Options(); | |
opts1.inJustDecodeBounds = true; | |
BitmapFactory.decodeStream(new FileInputStream(f), null, opts1); | |
// The new size we want to scale to |
// requires StringHelpers | |
enum class GravatarDefault(val str: String) { | |
ERROR_404 ("404"), | |
MYSTERY ("mm"), | |
IDENTICON ("identicon"), | |
MONSTER ("monsterid"), | |
WAVATAR ("wavatar"), | |
RETRO ("retro"), | |
BLANK ("blank"), |