Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Luis Matos luismts

🎯
Focusing
Block or report user

Report or block luismts

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@luismts
luismts / basic-example-clasic-cs.cs
Last active May 8, 2020
A comparison between classic C#, C# markup, and XAML for creating UI
View basic-example-clasic-cs.cs
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 Jan 10, 2020 — forked from jgold6/gist:a1e60e0bb24ccdd2b2b8
Xamarin Reduce App Size
View XamarinReduceAppSize.md
View EntryShort.cs
...
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),
...
View Entry.cs
...
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),
...
View Entry.xaml
...
<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}" />
...
@luismts
luismts / GitCommitBestPractices.md
Last active Jan 1, 2019
Git Tips and Git Commit Best Practices
View GitCommitBestPractices.md

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.

View xamarin.forms-dependencyservice.cs
/// XF Project
namespace UsingDependencyService
{
public interface IToDo {
void ToDo (); //note that interface members are public by default
}
}
namespace UsingDependencyService.Service
{
View xamarin.forms-restful.cs
public class RestService : IRestService
{
HttpClient client;
...
public RestService ()
{
client = new HttpClient (); // Creating the HTTPClient Object
}
View xamarin.forms-4.0-CollectionView.xaml
<CollectionView ItemsSource="{Binding Blogs}">
<CollectionView.ItemTemplate>
<DataTemplate>
<Grid Padding="10">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
You can’t perform that action at this time.