Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
import java.io.BufferedInputStream; | |
import java.io.File; | |
import java.io.FileInputStream; | |
import java.io.FileNotFoundException; | |
import java.io.IOException; | |
import java.security.InvalidKeyException; | |
import java.security.NoSuchAlgorithmException; | |
import java.security.NoSuchProviderException; | |
import java.security.PublicKey; | |
import java.security.SignatureException; |
import sbt._ | |
import sbt.Keys._ | |
import android.Keys._ | |
object JavaAndroidBuild extends Build { | |
lazy val rootSettings = Seq( | |
packageT in Compile <<= packageT in Android in app3, | |
packageRelease <<= packageRelease in Android in app3, | |
packageDebug <<= packageDebug in Android in app3 |
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
### Keybase proof | |
I hereby claim: | |
* I am prt2121 on github. | |
* I am prat (https://keybase.io/prat) on keybase. | |
* I have a public key whose fingerprint is B33B 76D2 DEEB 1DF3 AF0A 0786 F4BB B96C 1B23 D899 | |
To claim this, I am signing this object: |
public class OAuthActivity extends Activity { | |
public static String OAUTH_URL = "https://github.com/login/oauth/authorize"; | |
public static String OAUTH_ACCESS_TOKEN_URL = "https://github.com/login/oauth/access_token"; | |
public static String CLIENT_ID = "YOUR_CLIENT_ID"; | |
public static String CLIENT_SECRET = "YOUR_CLIENT_SECRET"; | |
public static String CALLBACK_URL = "http://localhost"; | |
@Override |
<?xml version="1.0" encoding="utf-8"?> | |
<manifest | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.novoda.espresso"> | |
<!-- For espresso testing purposes, this is removed in live builds, but not in dev builds --> | |
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE" /> | |
<!-- ... --> | |
<?xml version="1.0" encoding="utf-8"?> | |
<!-- This file should be outside of release manifest (in this case app/src/mock/Manifest.xml --> | |
<manifest | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.example.tests"> | |
<!-- For espresso testing purposes, this is removed in live builds, but not in dev builds --> | |
<uses-permission android:name="android.permission.SET_ANIMATION_SCALE" /> | |
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" /> | |
<uses-permission android:name="android.permission.WAKE_LOCK" /> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
01-01 18:46:06.352 10240 10258 D App : <!doctype html> | |
01-01 18:46:06.352 10240 10258 D App : <html> | |
01-01 18:46:06.352 10240 10258 D App : | |
01-01 18:46:06.352 10240 10258 D App : <head> | |
01-01 18:46:06.352 10240 10258 D App : | |
01-01 18:46:06.352 10240 10258 D App : <meta charset="utf-8"/> | |
01-01 18:46:06.352 10240 10258 D App : <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"/> | |
01-01 18:46:06.352 10240 10258 D App : <meta name="viewport" content="width=device-width, initial-scale=1"/> | |
01-01 18:46:06.352 10240 10258 D App : | |
01-01 18:46:06.352 10240 10258 D App : |
import com.google.common.truth.Truth.assertThat | |
import org.junit.Test as test | |
/** | |
* Created by pt2121 on 11/22/15. | |
*/ | |
class scanTest { | |
fun <A, B> Iterable<A>.scanl(initial: B, f: (B, A) -> B): List<B> { | |
return listOf(initial).plus(if (this.count() == 0) { |