Simple Horizontal Divider Item Decoration for RecyclerView
mRecyclerView.addItemDecoration(new SimpleDividerItemDecoration(
getApplicationContext()
));
NOTE: Add item decoration prior to setting the adapter
package de.markusfisch.android.textrect; | |
import android.app.Activity; | |
import android.graphics.Canvas; | |
import android.graphics.Color; | |
import android.graphics.Paint; | |
import android.graphics.RectF; | |
import android.os.Bundle; | |
import android.view.SurfaceHolder; | |
import android.view.SurfaceView; |
/usr/libexec/PlistBuddy -c 'Add :LSUIElement bool true' /Applications/iTerm.app/Contents/Info.plist |
/* | |
* 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 |
export PATH="/opt/android-sdk-linux/tools:${PATH}" |
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); | |
} |
# | |
# 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 | |
# |
#!/usr/bin/env perl | |
# Copyright (c) 2015 Sergey Lyubka | |
# All rights reserved | |
use Encode; | |
my $dir = "/Users/$ENV{USER}/.Trash"; | |
sub read_file($) { local $/; open FD, $_[0] or die $_[0]; binmode FD; <FD>; } |
#!/bin/bash | |
# | |
# Copies certain kinds of known files and directories from a given Jenkins master directory | |
# into a git repo, removing any old ones, adds 'em, commits 'em, pushes 'em. | |
# | |
set -ex | |
if [ $# -ne 2 ]; then | |
echo usage: $0 root_dir jenkins_master |
#!/bin/bash | |
# Have to redirect stderr to stdout here because slave.py uses stderr for output. | |
~/bin/slave.py list 2>&1 >/dev/null | grep beaker-slave- | while read slave; do | |
echo | |
echo "Checking status of $slave..." | |
# First, check if we can SSH into the host. If we can, then check the process and maybe shut down. | |
# This makes sure that we don't consider an SSH failure to be reason to shut down the node. | |
if ssh $slave echo < /dev/null; then |