I hereby claim:
- I am zsiegel on github.
- I am zac_siegel (https://keybase.io/zac_siegel) on keybase.
- I have a public key ASCYByFxKK6PPTljWeUDyY0yPJ2Ynh1Go0j-IqN-T2TbNwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
function githarvest() { | |
local week_ago=$(eval date -v -7d +'%d/%m/%Y') | |
git log --since $week_ago --author="YOUR GIT NAME HERE" --pretty=format:'%C(yellow)%h|%Cred%ad|%Cblue%an|%Cgreen%d %Creset%s' --date=short | |
} |
public class AnimatingDrawerToggle extends ActionBarDrawerToggle { | |
public enum State { | |
UP, | |
HOME | |
} | |
private static final float MENU_POSITION = 0f; | |
private static final float ARROW_POSITION = 1.0f; |
//Setup how the content elements should animate | |
TransitionSet transitionSet = new TransitionSet(); | |
transitionSet.addTransition( | |
new Slide(Gravity.TOP).addTarget(R.id.header_container) | |
//Why do i have to exclude this? | |
.excludeTarget(R.id.content_container, true)); | |
transitionSet.addTransition( | |
new Slide(Gravity.BOTTOM).addTarget(R.id.content_container) |
public class MyPresenter { | |
public MyPresenter(IView viewInterface){ | |
} | |
public void start() { | |
//this should be called from a onResume() lifecycle method or similar | |
//subscribe here | |
} |
package com.square.flow; | |
import android.util.SparseArray; | |
import com.google.common.reflect.TypeToken; | |
import com.google.gson.Gson; | |
import com.google.gson.JsonElement; | |
import com.google.gson.TypeAdapter; | |
import com.google.gson.stream.JsonReader; | |
import com.google.gson.stream.JsonToken; |
public void setupStrictMode() { | |
StrictMode.enableDefaults(); | |
StrictMode.setThreadPolicy(new StrictMode.ThreadPolicy.Builder() | |
.detectAll() | |
.penaltyLog() | |
.penaltyDeath() | |
.build()); | |
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder() |
task('increaseVersionCode') << { | |
def manifestFile = file("src/main/AndroidManifest.xml") | |
def pattern = Pattern.compile("versionCode=\"(\\d+)\"") | |
def manifestText = manifestFile.getText() | |
def matcher = pattern.matcher(manifestText) | |
matcher.find() | |
def versionCode = Integer.parseInt(matcher.group(1)) | |
android.defaultConfig.versionCode = versionCode + 1 | |
println "Setting version code to ${android.defaultConfig.versionCode}" | |
def manifestContent = matcher.replaceAll("versionCode=\"" + android.defaultConfig.versionCode + "\"") |