This file contains 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
#set($ModelName = $Model.replace("ViewModel","")) | |
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME}#end | |
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import androidx.recyclerview.widget.DiffUtil | |
import androidx.recyclerview.widget.RecyclerView | |
class ${NAME}: RecyclerView.Adapter<${ModelName}ViewHolder>() { |
This file contains 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
<style name="Form.Field.EditText" | |
parent="@style/Widget.MaterialComponents.TextInputEditText.OutlinedBox.Dense"> | |
<item name="android:paddingTop">8dp</item> | |
<item name="android:paddingLeft">16dp</item> | |
<item name="android:paddingBottom">8dp</item> | |
<item name="android:paddingRight">16dp</item> | |
<item name="android:paddingStart">16dp</item> | |
<item name="android:paddingEnd">16dp</item> | |
</style> |
This file contains 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
for URL in `cat urls`; do curl -m 10 -s -X GET -I $1 "$URL" | grep HTTP/1.1 | (awk {'printf $2 '}; echo " $URL")| grep "^[^2]"; done |
This file contains 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
#!/bin/sh | |
local_branch=$(git rev-parse --abbrev-ref HEAD) | |
if [[ ! "$local_branch" == feature* ]] | |
then | |
echo 'Failed to push. Branch name should start by feature/' | |
exit 1 | |
fi | |
if [ "${#local_branch}" -ge 38 ] | |
then | |
echo 'Failed to push. Branch name could not be longer than 30 characters' |
This file contains 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
find . -type f -exec grep -n "class [A-Z]" {} +^C |
This file contains 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 'dart:async'; | |
import 'dart:convert'; | |
import 'package:flutter/services.dart'; | |
class SWApi { | |
Future<Map<String, String>> getCharacter(String id) async { | |
var httpClient = createHttpClient(); | |
var response = await httpClient.get('https://swapi.co/api/people/${id}/'); | |
Map<String, Object> character = JSON.decode(response.body); |
This file contains 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.content.Context; | |
import android.content.res.TypedArray; | |
import android.util.AttributeSet; | |
public class SquareTextView extends android.support.v7.widget.AppCompatTextView { | |
public SquareTextView(Context context) { | |
super(context); | |
} |
This file contains 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 com.scmspain.bluejobs.candidateagent; | |
import java.util.ArrayList; | |
import java.util.HashMap; | |
import java.util.List; | |
import java.util.Map; | |
import rx.Observable; | |
public abstract class Cache<I, T> { |
This file contains 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
apply plugin: 'me.tatarka.retrolambda' //actives use of Retrolambda | |
buildscript { | |
repositories { | |
jcenter(); // to find plugins | |
} | |
dependencies { | |
classpath 'me.tatarka:gradle-retrolambda:3.3.0-beta4' //retrolambda | |
classpath 'me.tatarka.retrolambda.projectlombok:lombok.ast:0.2.3.a2' //lombok for that makes lint work with retrolambda | |
} |
This file contains 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.content.Context; | |
import android.database.DataSetObserver; | |
import android.graphics.Rect; | |
import android.util.AttributeSet; | |
import android.view.GestureDetector; | |
import android.view.GestureDetector.OnGestureListener; | |
import android.view.MotionEvent; | |
import android.view.View; | |
import android.widget.AdapterView; |