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
ffmpeg \ | |
-i $1 \ | |
-preset veryfast \ | |
-vcodec libx264 \ | |
-ar 44100 \ | |
-f flv \ | |
"$2" |
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
The OAuth callback succeeded, but you are possibly using Android 7.0+ and Twitter's redirect may not be working correctly. | |
Switch back to your Android app and try to login again! | |
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 codepath.com.recyclerviewfun; | |
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.List; | |
import java.util.Set; | |
public class Contact { | |
private int mId; |
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
// See https://github.com/rogerhu/parse-server-push-marker-example/blob/master/cloud/main.js#L43-L66 | |
// for corresponding server code. | |
public class PushTest { | |
public static void sendPushTest() { | |
JSONObject payload = new JSONObject(); | |
try { | |
payload.put("sender", ParseInstallation.getCurrentInstallation().getInstallationId()); | |
} catch (JSONException e) { |
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
// See http://parseplatform.github.io/docs/js/guide/ | |
// https://parseplatform.github.io/docs/js/guide/#query-constraints | |
Parse.Cloud.define('pushToChannel', function(request, response) { | |
var params = request.params; | |
var channel = params.channel; | |
if (!channel) { | |
response.error('must provide a channel'); |
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
// Inspired from https://gist.github.com/adrianbk/c4982e5ebacc6b6ed902 | |
apply plugin: 'maven-publish' | |
def isReleaseBuild() { | |
return VERSION_NAME.contains("SNAPSHOT") == false | |
} | |
def getOutputDir() { | |
if (isReleaseBuild()) { |
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
import android.support.v7.widget.RecyclerView; | |
public class RecyclerViewSwipeListener extends RecyclerView.OnFlingListener { | |
private static final int SWIPE_VELOCITY_THRESHOLD = 2000; | |
boolean mIsScrollingVertically; | |
// change swipe listener depending on whether we are scanning items horizontally or vertically | |
RecyclerViewSwipeListener(boolean vertical) { |
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 codepath.com.nytimesfun; | |
import com.google.gson.JsonArray; | |
import com.google.gson.JsonDeserializationContext; | |
import com.google.gson.JsonDeserializer; | |
import com.google.gson.JsonElement; | |
import com.google.gson.JsonParseException; | |
import android.text.TextUtils; |
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 abstract class EndlessRecyclerViewScrollListener extends RecyclerView.OnScrollListener { | |
// The minimum amount of items to have below your current scroll position | |
// before loading more. | |
private int visibleThreshold = 5; | |
// The current offset index of data you have loaded | |
private int currentPage = 0; | |
// The total number of items in the dataset after the last load | |
private int previousTotalItemCount = 0; | |
// True if we are still waiting for the last set of data to load. | |
private boolean loading = true; |
NewerOlder