Skip to content

Instantly share code, notes, and snippets.

@xiaomingtuo
xiaomingtuo / RxErrorHandlingCallAdapterFactory.java
Created January 7, 2019 08:25 — forked from joen93/RxErrorHandlingCallAdapterFactory.java
RxJava2 and Retrofit 2.2.0 compatible factory, which wraps the {@link RxJava2CallAdapterFactory} and takes care of the error conversion.
/**
* RxJava2 and Retrofit 2.2.0 compatible factory,
* which wraps the {@link RxJava2CallAdapterFactory} and takes care of the error conversion.
*
* Based on: https://github.com/square/retrofit/issues/1102#issuecomment-241250796
*/
public class RxErrorHandlingCallAdapterFactory extends CallAdapter.Factory {
private final RxJava2CallAdapterFactory mOriginalCallAdapterFactory;
private RxErrorHandlingCallAdapterFactory() {
@xiaomingtuo
xiaomingtuo / CircleTransform.java
Created October 29, 2018 09:12 — forked from julianshen/CircleTransform.java
CircleTransform for Picasso
/*
* Copyright 2014 Julian Shen
*
* 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
[
{ "key": "ctrl+shift+f", "command": "editor.action.format", "when": "editorTextFocus" },
{ "key": "ctrl+alt+down", "command": "editor.action.copyLinesDownAction", "when": "editorTextFocus" },
{ "key": "ctrl+alt+up", "command": "editor.action.copyLinesUpAction", "when": "editorTextFocus" },
{ "key": "alt+down", "command": "editor.action.moveLinesDownAction", "when": "editorTextFocus" },
{ "key": "alt+up", "command": "editor.action.moveLinesUpAction", "when": "editorTextFocus" },
{ "key": "ctrl+d", "command": "editor.action.deleteLines", "when": "editorTextFocus" },
{ "key": "alt+shift+r", "command": "editor.action.rename", "when": "editorTextFocus" },
{ "key": "ctrl+space", "command": "editor.action.triggerSuggest", "when": "editorTextFocus" },
{ "key": "f3", "command": "editor.action.goToDeclaration", "when": "editorTextFocus" },
@xiaomingtuo
xiaomingtuo / keybindings.json
Created August 6, 2018 09:13 — forked from yuki-takei/keybindings.json
Visual Studio Code - Eclipse Keybindings (Win, Linux)
[
{
"key": "ctrl+d",
"command": "editor.action.cutLines",
"when": "editorTextFocus"
},
{
"key": "ctrl+o",
"command": "workbench.action.gotoSymbol"
},