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
| class Observable | |
| def initialize(&on_subscribe) | |
| @on_subscribe = on_subscribe | |
| end | |
| def self.from(arr) | |
| new do |o| | |
| arr.each do |i| | |
| o.on_next(i) | |
| end |
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
| public static class ExceptionParser { | |
| private final ResponseBody body; | |
| private final String bodyString; | |
| private final Converter.Factory converterFactory; | |
| public ExceptionParser(Response response, Converter.Factory converterFactory) { | |
| this.converterFactory = converterFactory; | |
| this.body = cloneResponseBody(response.errorBody()); | |
| this.bodyString = getBodyAsString(body); | |
| } |
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
| { | |
| "page":1, | |
| "totalPages":1, | |
| "totalResults":1, | |
| "type":"FUTPlayerItemList", | |
| "count":1, | |
| "items":[ | |
| { | |
| "commonName":"Cristiano Ronaldo", | |
| "firstName":"C. Ronaldo", |
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
| private static List<File> findAllFiles(String baseDirectory) { | |
| List<File> files = new LinkedList<File>(); | |
| List<File> directories = new LinkedList<File>(); | |
| directories.add(new File(baseDirectory)); | |
| while (!directories.isEmpty()) { | |
| File [] subFiles = directories.remove(0).listFiles(); | |
| for (File f : subFiles) { | |
| if (f.isDirectory()) { |
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 retrofit.labs; | |
| import com.squareup.okhttp.RequestBody; | |
| import java.util.Map; | |
| public abstract class FormUrlEncodedRequest<T> extends Request<T> { | |
| public FormUrlEncodedRequest(Listener<T> listener) { | |
| super(listener); |
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.os.Bundle; | |
| import android.os.Parcelable; | |
| /** | |
| * A Bundle that doesn't suck. Allows you to chain method calls as you'd expect. | |
| */ | |
| public class BundleBuilder { | |
| private final Bundle bundle; |
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
| SELECT * FROM information_schema.processlist WHERE info IS NOT NULL AND TIME > 1; |
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
| adb shell am start -a android.intent.action.VIEW -d “scheme://host/path?query=value" |
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
| ### Keybase proof | |
| I hereby claim: | |
| * I am felipecsl on github. | |
| * I am felipecsl (https://keybase.io/felipecsl) on keybase. | |
| * I have a public key whose fingerprint is 4D6F 916F A81F 5861 1066 5FE5 E062 1CF8 F64A 2D1B | |
| To claim this, I am signing this object: |
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
| /* | |
| * Copyright (C) 2013 The Android Open Source Project | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software |