Skip to content

Instantly share code, notes, and snippets.

View luismts's full-sized avatar
🚀
Kaizen

Luis Matos luismts

🚀
Kaizen
View GitHub Profile
@luismts
luismts / basic-example-clasic-cs.cs
Last active May 8, 2020 16:04
A comparison between classic C#, C# markup, and XAML for creating UI
var grid = new Grid();
var label = new Label { Text = "Code:" };
grid.Children.Add(label, 0, 1);
var entry = new Entry
{
Placeholder = "Enter number",
Keyboard = Keyboard.Numeric,
BackgroundColor = Color.AliceBlue,
@luismts
luismts / XamarinReduceAppSize.md
Last active January 10, 2020 14:36 — forked from jgold6/gist:a1e60e0bb24ccdd2b2b8
Xamarin Reduce App Size
...
new Entry { Placeholder = "Sigueme en las redes @luismatosluna", Keyboard = Keyboard.Numeric }
.Grid.Row(2) .Grid.ColumnSpan(2) .Margin(myMargin) .Height(20)
.Bind(nameof(vm.RegistrationCode), BindingMode.TwoWay),
...
@luismts
luismts / Entry.cs
Last active December 10, 2019 14:54
...
new Entry { Placeholder = "Sigueme en las redes @luismatosluna", Keyboard = Keyboard.Numeric,
Margin = myMargin, HeightRequest = 20 }
.Grid.Row(2) .Grid.ColumnSpan(2)
.Bind(nameof(vm.RegistrationCode), BindingMode.TwoWay),
...
@luismts
luismts / Entry.xaml
Last active December 10, 2019 14:54
...
<Entry Placeholder="Sigueme en las redes @luismatosluna" Keyboard="Numeric"
Margin="{StaticResource myMargin}" HeightRequest="20"
Grid.Row="2" Grid.ColumnSpan="2"
Text="{Binding RegistrationCode, Mode=TwoWay}" />
...
...
Forms.SetFlags("Visual_Experimental");
...
@luismts
luismts / GitCommitBestPractices.md
Last active April 15, 2024 09:00
Git Tips and Git Commit Best Practices

Git Commit Best Practices

Basic Rules

Commit Related Changes

A commit should be a wrapper for related changes. For example, fixing two different bugs should produce two separate commits. Small commits make it easier for other developers to understand the changes and roll them back if something went wrong. With tools like the staging area and the ability to stage only parts of a file, Git makes it easy to create very granular commits.

Commit Often

Committing often keeps your commits small and, again, helps you commit only related changes. Moreover, it allows you to share your code more frequently with others. That way it‘s easier for everyone to integrate changes regularly and avoid having merge conflicts. Having large commits and sharing them infrequently, in contrast, makes it hard to solve conflicts.

/// XF Project
namespace UsingDependencyService
{
public interface IToDo {
void ToDo (); //note that interface members are public by default
}
}
namespace UsingDependencyService.Service
{
public class RestService : IRestService
{
HttpClient client;
...
public RestService ()
{
client = new HttpClient (); // Creating the HTTPClient Object
}
<CollectionView ItemsSource="{Binding Blogs}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>