Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Luis Matos luismts

🎯
Focusing
View GitHub Profile
@luismts
luismts / delete_git_submodule.md
Created Aug 13, 2021 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.
View delete_git_submodule.md

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@luismts
luismts / BindableScrollableStackLayout.xaml
Created Jul 15, 2021 — forked from TrueGeek/BindableScrollableStackLayout.xaml
Xamarin Forms Bindable Scrollable StackLayout
View BindableScrollableStackLayout.xaml
<?xml version="1.0" encoding="UTF-8"?>
<ScrollView
xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
x:Class="Project.Controls.BindableScrollableStackLayout">
<StackLayout x:Name="stackLayout" />
</ScrollView>
@luismts
luismts / ObjectMapper.cs
Created Dec 27, 2020 — forked from yemrekeskin/ObjectMapper.cs
using Automapper vs Custom Object Mapper(with reflection) for data transformation of objects
View ObjectMapper.cs
public class BaseModel
{
public Guid Id { get; set; }
public DateTime CreateDate { get; set; }
public bool IsActive { get; set; }
public string LastUpdatingUserName { get; set; }
public DateTime LastUpdatingDate { get; set; }
}
@luismts
luismts / BooleanToObjectConverter.cs
Created Dec 12, 2020 — forked from QiMata/BooleanToObjectConverter.cs
A list of useful converters for Xamarin Forms
View BooleanToObjectConverter.cs
public class BooleanToObjectConverter : BindableObject, IValueConverter
{
public static readonly BindableProperty TrueObjectProperty = BindableProperty.Create<BooleanToObjectConverter, Object>(x => x.TrueObject, null);
public static readonly BindableProperty FalseObjectProperty = BindableProperty.Create<BooleanToObjectConverter, Object>(x => x.FalseObject, null);
public object FalseObject
{
get { return GetValue(FalseObjectProperty); }
set { SetValue(FalseObjectProperty, value); }
}
@luismts
luismts / gist:c01d9ba5b0ea195386add22add4436e0
Last active Oct 24, 2020 — forked from williamgh2019/VMware Workstation Pro 16 license keys
Free VMware Workstation Pro 16 full license keys with tested
We couldn’t find that file to show.
@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}" />
...