View SherlockMapFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013 Sebastian Engel | |
* | |
* 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 |
View SherlockYouTubePlayerFragment.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright (C) 2013 Sebastian Engel | |
* | |
* 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 |
View fragment_locations_map.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:id="@+id/map_view_container" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.google.android.gms.maps.MapView | |
android:id="@+id/map_view" | |
android:layout_width="match_parent" |
View TimberLogger.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package de.bsr.android.util; | |
import com.example.app.BuildConfig; | |
import timber.log.Timber; | |
/** | |
* Wrapper class for Timber that evaluates <code>BuildConfig.DEBUG</code> on construction | |
* and uses Timber.DEBUG or Timber.PROD appropriately. In PROD mode, no logging is done at all. | |
* | |
* @author Sebastian Engel <engel.sebastian@gmail.com> |
View multiple-constraints.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/core/src/main/java/novoda/lib/sqliteprovider/provider/action/InsertHelper.java b/core/src/main/java/novoda/lib/sqliteprovider/provider/action/InsertHelper.java | |
index 864fb45..555da5f 100644 | |
--- a/core/src/main/java/novoda/lib/sqliteprovider/provider/action/InsertHelper.java | |
+++ b/core/src/main/java/novoda/lib/sqliteprovider/provider/action/InsertHelper.java | |
@@ -6,6 +6,8 @@ import android.database.Cursor; | |
import android.database.SQLException; | |
import android.net.Uri; | |
+import java.util.List; | |
+ |
View 1_initial_schema.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ... | |
CREATE TABLE "image_likers" ( | |
_id INTEGER PRIMARY KEY AUTOINCREMENT, | |
image_id INTEGER, | |
user_id INTEGER, | |
UNIQUE(image_id, user_id) ON CONFLICT REPLACE, | |
FOREIGN KEY (image_id) REFERENCES "images" (_id), | |
FOREIGN KEY (user_id) REFERENCES "users" (_id) |
View DefaultHeaderTransformer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void setProgressBarColor(int color) { | |
if (color != mProgressDrawableColor) { | |
mProgressDrawableColor = color; | |
applyProgressBarSettings(); | |
} | |
} | |
private void applyProgressBarSettings() { | |
if (mHeaderProgressBar != null) { | |
final int strokeWidth = mHeaderProgressBar.getResources() |
View CroutonController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package your_package; | |
import android.app.Activity; | |
import android.app.Application; | |
import android.content.res.Resources; | |
import android.os.Bundle; | |
import cyour_package.R; | |
import javax.inject.Inject; |
View throttle_google_drive.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Usage: throttle_google_drive.sh <start/stop> | |
function start_ipfw_throttle() { | |
sudo ipfw pipe 1 config bw 100KByte/s | |
sudo ipfw add 1 pipe 1 ip from me to 64.18.0.0/20 | |
sudo ipfw add 1 pipe 1 ip from me to 64.233.160.0/19 |
View PagerTwoTabsStrip.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Subclass of {@link PagerTwoTitlesStrip} and so implementation of a {@link android.widget.LinearLayout} | |
* used as a {@link android.support.v4.view.ViewPager} indicator. This view holds two {@link android.widget.TextView}s, each being | |
* the title of the two pages. The title of the 'current' tab is underlined by a tab indicator. | |
* | |
* <p>Inspired by Google's {@link PagerTabStrip}</p> | |
*/ | |
public class PagerTwoTabsStrip extends PagerTwoTitlesStrip { | |
@SuppressWarnings("unused") |
OlderNewer