Skip to content

Instantly share code, notes, and snippets.

View felipebaltazar's full-sized avatar
👋

Felipe Baltazar felipebaltazar

👋
View GitHub Profile
{
"questions": [
{
"id": "2733ec12-9a03-4f31-bc97-afb4b2a9ed1e",
"title": "What kind of content do you typically cover?",
"description": "Choose up to four options",
"type": "multiChoice",
"maxSelection": 4,
"answers": [
"Lifestyle",
trigger:
- main
jobs:
- job: Job_Android
displayName: Build Android
pool:
vmimage: 'windows-latest'
steps:
- task: UseDotNet@2
@felipebaltazar
felipebaltazar / azuredevops.yaml
Created September 24, 2023 16:29
Paralel jobs for android and ios
trigger:
- main
jobs:
- job: Job_Android
displayName: Build Android
- job: Job_iOS
displayName: Build iOS
@felipebaltazar
felipebaltazar / azuredevops.yaml
Created September 24, 2023 16:18
Starter pipeline template
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- main
pool:
vmImage: ubuntu-latest
<WebView Source="{EmbeddedAsset MyPage.html}"
VerticalOptions="FillAndExpand"
HorizontalOptions="FillAndExpand"/>
@felipebaltazar
felipebaltazar / AssemblyInfo.cs
Created December 12, 2021 23:49
Embedded assets demo
using Xamarin.Forms.EmbeddedAssets;
using Xamarin.Forms.Xaml;
[assembly: XamlCompilation(XamlCompilationOptions.Compile)]
[assembly: ExportAsset("MyPage.html", loadAssociatedResourcesInFolder: true)]
{
"stryker-config": {
"mutation-level": "Advanced",
"reporters": [ "html", "json", "progress" ],
"thresholds": {
"high": 80,
"low": 60,
"break": 0
}
}
public class MyViewModelTests
{
private readonly MyViewModel _myViewModel = new MyViewModel();
[Theory]
[InlineData("111.111.111-11", true)]
[InlineData("111111.111-11", false)]
[InlineData("111.111111-11", false)]
[InlineData("111.111.11111", false)]
[InlineData("11111111111", false)]
@felipebaltazar
felipebaltazar / MyViewModel.cs
Created December 11, 2021 22:08
Stryker mutation test sample
public class MyViewModel
{
private readonly Regex _cpfMask = new Regex(@"^\d{3}\.\d{3}\.\d{3}-\d{2}$", RegexOptions.Compiled);
public bool IsValidCPF(string cpfInput)
{
if (string.IsNullOrWhiteSpace(cpfInput))
return false;
return _cpfMask.Match(cpfInput).Success;
public interface IRepository<TEntity> where TEntity : Base
{
ValueTask InsertAsync(TEntity entityToInsert);
ValueTask<TEntity> GetAsync(Expression<Func<TEntity, bool>> predicate);
ValueTask<TEntity> FirstOrDefaultAsync<TField>(Expression<Func<TEntity, TField>> orderBy);
ValueTask<TEntity> LastOrDefaultAsync<TField>(Expression<Func<TEntity, TField>> orderBy);
ValueTask<IEnumerable<TEntity>> GetManyAsync(Expression<Func<TEntity, bool>> predicate, int skip = 0, int limit = int.MaxValue);
ValueTask UpdateAsync(TEntity entityToUpdate, Expression<Func<TEntity, bool>> predicate);
ValueTask<bool> Exists(TEntity entity);
ValueTask<bool> DeleteAsync(TEntity entityToDelete);