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
#Instalação | |
#zsh-syntax-highlighting | |
# > git clone https://github.com/zsh-users/zsh-syntax-highlighting.git $ZSH_CUSTOM/plugins/zsh-syntax-highlighting | |
#Instalação do zsh-autosuggestions | |
# > git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions | |
#Instalação do zsh-fast-syntax-highlighting plugin | |
# > git clone https://github.com/zdharma-continuum/fast-syntax-highlighting.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/plugins/fast-syntax-highlighting |
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
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Text.Json; | |
using System.Text.Json.Serialization; | |
var pat = "abc123"; | |
var organization = "my_org"; | |
var projectName = "my_project"; | |
var userEmail = "[email protected]"; |
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
#vai no repositório de containers da MS e baixa a imagem do aspnet dando o nome de base | |
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base | |
#cria uma pasta chamada app dentro da "imagem" | |
WORKDIR /app | |
#expõe a porta 80 do container (HTTP) | |
EXPOSE 80 | |
#expõe a porta 443 do container (HTTPS) |
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
#Passo-a-passo para a instalação do Elastic Stack seguindo as aulas do Eduardo Neves (https://www.youtube.com/watch?v=B3Vl0nQyK-U) | |
#Esse passo-a-passo foi testado no Ubuntu 20.04 | |
#Java | |
sudo apt update | |
sudo apt install default-jre | |
sudo apt install default-jdk | |
export JAVA_HOME=/usr/lib/jvm/default-java- | |
export PATH=${PATH}:${JAVA_HOME}/bin |
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
private AsyncRetryPolicy CreatePolicy(RetryPolicyConfiguration retryPolicyConfiguration) | |
=> Policy.Handle<Exception>(e => true) | |
.WaitAndRetryAsync(retryCount: retryPolicyConfiguration.RetryCount, | |
retryAttempt => TimeSpan.FromSeconds(Math.Pow(2, retryPolicyConfiguration.RetryAttemptFactor)) | |
); |
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
protected async Task<Result<T>> Get<T>(string url) | |
{ | |
return await this._asyncRetryPolicy.ExecuteAsync(async () => | |
{ | |
var response = await this._httpClient.GetAsync(url); | |
return await this.GetRequestContent<T>(response); | |
}); | |
} |
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
public abstract class ServiceBase | |
{ | |
private readonly HttpClient _httpClient; | |
private readonly AsyncRetryPolicy _asyncRetryPolicy; | |
public ServiceBase(HttpClient httpClient, RetryPolicyConfiguration retryPolicyConfiguration) | |
{ | |
this._httpClient = httpClient; | |
this._asyncRetryPolicy = this.CreatePolicy(retryPolicyConfiguration); | |
} |
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
// Adiciona-se o namespace | |
using Xamarin.Forms.PlatformConfiguration.iOSSpecific; | |
// E no método OnAppearing... | |
protected override void OnAppearing() | |
{ | |
base.OnAppearing(); | |
this.On<iOS>().SetUseSafeArea(true); | |
this.On<iOS>().SetPrefersLargeTitles(true); | |
} |
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
<?xml version="1.0" encoding="utf-8"?> | |
<TabbedPage xmlns="http://xamarin.com/schemas/2014/forms" | |
xmlns:android="clr-namespace:Xamarin.Forms.PlatformConfiguration.AndroidSpecific;assembly=Xamarin.Forms.Core" | |
android:TabbedPage.ToolbarPlacement="Bottom" |
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
// Adiciona-se o namespace | |
using Xamarin.Forms.PlatformConfiguration.AndroidSpecific; | |
// E no método OnAppearing... | |
protected override void OnAppearing() | |
{ | |
base.OnAppearing(); | |
this.On<Android>().SetToolbarPlacement(ToolbarPlacement.Bottom); | |
} |
NewerOlder