Skip to content

Instantly share code, notes, and snippets.

View thiagoolsilva's full-sized avatar
🏠
Working from home

thiago lopes silva thiagoolsilva

🏠
Working from home
View GitHub Profile
Espresso.onView(ViewMatchers.withId(R.id.btn_login))
.check(ViewAssertions.matches(ViewMatchers.isDisplayed()))
.perform(ViewActions.click())
.check(ViewAssertions.matches(CustomViewMatchers.withDummyStatus(LoginButton.DummyStatus.ERROR)));
fun joinStrings(
collection: Collection<String>,
separator: String = ","
): String {
val result = StringBuffer()
val firstElement = 0
for((index, word) in collection.withIndex()) {
if(index != firstElement) result.append(separator)
result.append(word)
}
import java.util.Arrays;
public class Test {
public static void main(String[] args) {
FunWithDefaultValuesKt.joinStrings(Arrays.asList("Thiago", "Lopes", "silva"));
}
}
@JvmOverloads
fun joinStrings(
collection: Collection<String>,
separator: String = ","
): String {
val result = StringBuffer()
val firstElement = 0
for((index, word) in collection.withIndex()) {
if(index != firstElement) result.append(separator)
result.append(word)
fun joinStrings(collection: Collection<String>) = joinStrings(collection = collection, separator = ",")
fun joinStrings(
collection: Collection<String>,
separator: String = ","
): String {
val result = StringBuffer()
val firstElement = 0
for((index, word) in collection.withIndex()) {
if(index != firstElement) result.append(separator)
#!/bin/bash
################################################################################
# Copyright (c) 2020 Thiago Lopes da Silva
# All Rights Reserved.
################################################################################
################################################################################
# Description:
# The script will create an Android Shortcut in linux system
[Desktop Entry]
Version=1.0
Type=Application
Name=Android Studio
Exec="ANDROID_STUDIO_PATH/bin/studio.sh" %f
Icon=ANDROID_STUDIO_PATH/bin/studio.png
Categories=Development;IDE;
Terminal=false
StartupNotify=true
StartupWMClass=jetbrains-android-studio
include:
- type: git
repo: https://github.com/batect/node-bundle.git
ref: 0.25.0
include:
- type: git
repo: https://github.com/batect/node-bundle.git
ref: 0.25.0
tasks:
# Build
build:
group: Build
description: Install all dependencies into docker volume
@thiagoolsilva
thiagoolsilva / dockerfile-without-multi-stage
Created December 28, 2021 18:46
Example of the use of multi stage docker build feature
# Copyright (c) 2021 Thiago Lopes da Silva
# 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
# distributed under the License is distributed on an "AS IS" BASIS,