-
Open your top level
build.gradle
file. -
Add Sonatype repo to buildscript repositories and Square Gradle Android Test Plugin to buildscript dependencies. (Older Gradle projects may automatically put this buildscript code in your project build.gradle, in which situation you should put the following in that file.)
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 | |
## Source this to add the functions to your environment | |
function choice { | |
file=${1} | |
lc=$(wc -l < $file) | |
if [ ${lc} -gt 0 ]; then | |
sed -n "$((1 + $RANDOM % ${lc})) p" ${file} |
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 os | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
from facepy import GraphAPI | |
import contextlib | |
import time | |
import threading | |
usr = 'FB_USER' | |
pwd = 'FB_PASS' |
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 class MenuPreference extends ListPreference { | |
private View anchor; | |
public MenuPreference(Context context) { | |
super(context); | |
} | |
public MenuPreference(Context context, AttributeSet attrs) { | |
super(context, attrs); | |
} |
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
#!/usr/bin/env python | |
# This is a demonstration script for Facebook Chat | |
# using the X-FACEBOOK-PLATFORM SASL mechanism. | |
# It requires pyfacebook and pyxmpp to be installed. | |
# This client only works for desktop applications (configured in the | |
# developer app), and uses the old-style auth.getSession mechanism to get a | |
# Facebook session. For newer-style or web apps, only the | |
# `get_facebook_client` function should have to change. |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
from pyquery import PyQuery as pq | |
import sys | |
import subprocess | |
import os | |
from urllib2 import urlopen, URLError, HTTPError | |
def convert(input_file, output_gif): | |
print "CONVERT", input_file, " => ", output_gif | |
subprocess.call(["mplayer", input_file, "-ao", "null", "-ss", "0:0:0", "-endpos", "6", "-vo", "gif89a:fps=8:output=%s" % output_gif, "-vf", "scale=240:180"]) |
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
# Imports the monkeyrunner modules used by this program | |
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice | |
# Connects to the current device, returning a MonkeyDevice object | |
device = MonkeyRunner.waitForConnection() | |
# Installs the Android package. Notice that this method returns a boolean, so you can test | |
# to see if the installation worked. | |
device.installPackage('../app/target/gauges-android-1.0.apk') |
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
#!/usr/bin/python | |
import ast, _ast, os | |
for root, dirs, files in os.walk('.'): | |
for name in files: | |
if name.endswith('.py'): | |
full = os.path.join(root, name) | |
t = ast.parse(open(full).read()) | |
for n in ast.walk(t): | |
if isinstance(n, _ast.Str) and not isinstance(n.s, unicode): |
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 -U 0 -N appcompat-v7-23.2.0_ff0f8a1a/android.support.v7.app.AppCompatDelegateImplV7$PanelFeatureState appcompat-v7-24.0.0-alpha1_4f276de6/android.support.v7.app.AppCompatDelegateImplV7$PanelFeatureState | |
--- appcompat-v7-23.2.0_ff0f8a1a/android.support.v7.app.AppCompatDelegateImplV7$PanelFeatureState 1969-12-31 19:00:00.000000000 -0500 | |
+++ appcompat-v7-24.0.0-alpha1_4f276de6/android.support.v7.app.AppCompatDelegateImplV7$PanelFeatureState 2016-03-09 19:28:22.000000000 -0500 | |
@@ -0,0 +1,5 @@ | |
+public final class android.support.v7.app.AppCompatDelegateImplV7$PanelFeatureState { | |
+ public boolean qwertyMode; | |
+ public boolean hasPanelItems(); | |
+ public void clearMenuPresenters(); | |
+} | |
diff -U 0 -N appcompat-v7-23.2.0_ff0f8a1a/android.support.v7.view.WindowCallbackWrapper appcompat-v7-24.0.0-alpha1_4f276de6/android.support.v7.view.WindowCallbackWrapper |
OlderNewer