Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
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:
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.
You can use this class to realize a simple sectioned RecyclerView.Adapter
without changing your code.
The RecyclerView
should use a LinearLayoutManager
.
You can use this code also with the TwoWayView
with the ListLayoutManager
(https://github.com/lucasr/twoway-view)
This is a porting of the class SimpleSectionedListAdapter
provided by Google
Example:
NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good
This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.
My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.
Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0
/* | |
* Your Stylesheet | |
* | |
* This stylesheet is loaded when Atom starts up and is reloaded automatically | |
* when it is changed and saved. | |
* | |
* Add your own CSS or Less to fully customize Atom. | |
* If you are unfamiliar with Less, you can read more about it here: | |
* http://lesscss.org | |
*/ |