Skip to content

Instantly share code, notes, and snippets.

View chagretes's full-sized avatar

Felipe Chagas chagretes

View GitHub Profile
using System;
using System.Threading.Tasks;
using Microsoft.ApplicationInsights;
using Microsoft.ApplicationInsights.DataContracts;
using Microsoft.ApplicationInsights.Extensibility;
using Microsoft.AspNetCore.Http;
using Proposta.API.Utils;
using Proposta.Shared.Interfaces;
namespace Proposta.API
@chagretes
chagretes / setup.sh
Last active November 1, 2021 17:16
arch-setup
# Coisinhas pra começar
# find /var/cache/pacman/pkg/ -iname "*.part" -exec rm {} \;
# rm -R /var/lib/pacman/sync/
sudo pacman-mirrors -f 5 && sudo pacman -Syyu
sudo cp CA.cer /etc/ca-certificates/trust-source/anchors/
sudo trust extract-compat
# Coisas de dev
pamac build visual-studio-code-bin
# https://www.hanselman.com/blog/side-by-side-user-scoped-net-core-installations-on-linux-with-dotnetinstallsh
@chagretes
chagretes / manifest.json
Created February 27, 2018 02:18
[Fake News Check] Manifest v0
{
"manifest_version": 2,
"name": "Fake News Check",
"description": "Essa extensão indica as chances de determinada notícia ser falsa ou não",
"version": "1.0",
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
@chagretes
chagretes / youtube.cs
Created March 15, 2017 20:03
Xamarin open a youtube URL
var urlStore = Device.OnPlatform("https://www.youtube.com/watch?v=W2Wnvvj33Wo", "https://www.youtube.com/watch?v=W2Wnvvj33Wo", "https://www.youtube.com/watch?v=W2Wnvvj33Wo"); //iOS,Android,Windows
Device.OpenUri(new Uri(urlStore));
@chagretes
chagretes / Resource.xml
Created January 18, 2017 16:35
Xamarin aplication resource style using OnPlatform
<Application.Resources>
<ResourceDictionary>
<OnPlatform x:TypeArguments="Font" Android="30" iOS="40" WinPhone="20" x:Key="TitleFontSize" />
<Style x:Key="MyTitleLabel" TargetType="Label" BaseResourceKey="TitleStyle">
<Setter Property="LineBreakMode" Value="TailTruncation" />
<Setter Property="XAlign" Value="Center" />
<Setter Property="Font" Value="{StaticResource TitleFontSize}" />
</Style>
@chagretes
chagretes / IsEnabledPropertyHandler.cs
Last active January 18, 2017 16:35
OnElementPropertyChanged iOS Native
/**
* Cor do texto não estava sendo aplicada conforme estilo
* no iOS quando o status do entry é setado para false
*
* Para contornar este bug a alteração foi feita programaticamente
*/
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
{
base.OnElementPropertyChanged(sender, e);
if (e.PropertyName.Equals("IsEnabled"))
@chagretes
chagretes / xamarin_ios_padding.cs
Last active January 17, 2017 11:59
Create Xamarin iOS left Padding inside a custom Entry
var paddingview = new UIView(new RectangleF(0, 0, 100, 1));
Control.LeftView = paddingview;
Control.LeftViewMode = UITextFieldViewMode.Always;
@chagretes
chagretes / 0_reuse_code.js
Created January 17, 2017 11:53
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console