This is a gist used in the following blog posts:
This file contains hidden or 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
if &compatible | |
set nocompatible | |
endif | |
set runtimepath+=/Users/man/.nvim/bundles/repos/github.com/Shougo/dein.vim | |
if dein#load_state('/Users/man/.nvim/bundles') | |
call dein#begin('/Users/man/.nvim/bundles') | |
call dein#add('/Users/man/.nvim/bundles/repos/github.com/Shougo/dein.vim') |
This file contains hidden or 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
// frida -U ${package} -l request.js | |
Java.perform(function () { | |
var OkHttpClient = Java.use("okhttp3.OkHttpClient"); | |
var RealCall = Java.use("okhttp3.RealCall"); | |
OkHttpClient.newCall.implementation = function (request) { | |
var result = this.newCall(request) | |
console.log(request.toString()) | |
return result |
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
This file contains hidden or 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
// ------------ Helper extension functions: | |
// Inline function to create Parcel Creator | |
inline fun <reified T : Parcelable> createParcel(crossinline createFromParcel: (Parcel) -> T?): Parcelable.Creator<T> = | |
object : Parcelable.Creator<T> { | |
override fun createFromParcel(source: Parcel): T? = createFromParcel(source) | |
override fun newArray(size: Int): Array<out T?> = arrayOfNulls(size) | |
} | |
// custom readParcelable to avoid reflection |
This file contains hidden or 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.util.Base64; | |
import com.google.gson.Gson; | |
import com.hpsaturn.robotsanta.Config; | |
import com.hpsaturn.robotsanta.models.MailGunResponse; | |
import retrofit.Callback; | |
import retrofit.RestAdapter; | |
import retrofit.converter.GsonConverter; | |
import retrofit.http.Field; |
This file contains hidden or 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 mobilepackage | |
import io.gatling.core.Predef._ | |
import io.gatling.core.session._ | |
import io.gatling.http.Predef._ | |
import scala.concurrent.duration._ | |
import scala.util.parsing.json._ | |
import general._ | |
class LoginSimulation extends Simulation { |
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:
NewerOlder