Skip to content

Instantly share code, notes, and snippets.

View ameerthehacker's full-sized avatar
📖
Learning

Ameer Jhan ameerthehacker

📖
Learning
View GitHub Profile

How to write a Blog?

confused

I know I know, I was also into a similar situation, scratching my head and don't feel bad if you are in a similar situation. There would be tons of questions popping off your mind just like it did for me and let us walk through a few of them shall we?

Am I good enough to write a blog?

bad

CLI Apps

cli-gif

CLI apps or so called command line apps are a fantastic way to learn language features and also to do some cool stuffs.

Learning Resources to build them from scratch

{
"plugins": [
["@babel/plugin-transform-react-jsx", {
"pragma": "QndReact.createElement", // default pragma is React.createElement
"throwIfNamespace": false // defaults to true
}]
]
}
const content = (
<h1 className="primary">
QndReact is Quick and dirty react{" "}
<p>It is about building your own React in 90 lines of JavsScript</p>
</h1>
);
// The above jsx gets converted into
/**
* React.createElement(type, attributes, children)
namespace XamarinFormValidation.Validators.Contracts
{
public interface IValidator
{
string Message { get; set; }
bool Check(string value);
}
public interface IAsyncValidator
{
<?xml version="1.0" encoding="utf-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:Validators="clr-namespace:XamarinFormValidation.Validators.Implementations"
xmlns:Behaviors="clr-namespace:XamarinFormValidation.Behaviors"
xmlns:local="clr-namespace:XamarinFormValidation" x:Class="XamarinFormValidation.MainPage">
<StackLayout Padding="15">
<StackLayout.Behaviors>
<Behaviors:ValidationGroupBehavior x:Name="form"/>
</StackLayout.Behaviors>
...
namespace XamarinFormValidation.Behaviors
{
public class ValidationBehavior : Behavior<View>
{
...
public ValidationGroupBehavior Group { get; set; }
public bool Validate()
{
...
namespace XamarinFormValidation.Behaviors
{
public class ValidationGroupBehavior: Behavior<View>
{
...
public void Update()
{
bool isValid = true;
...
namespace XamarinFormValidation.Behaviors
{
public class ValidationGroupBehavior: Behavior<View>
{
...
public void Add(ValidationBehavior validationBehavior)
{
_validationBehaviors.Add(validationBehavior);
}
using Xamarin.Forms;
using System.Collections.Generic;
namespace XamarinFormValidation.Behaviors
{
public class ValidationGroupBehavior: Behavior<View>
{
IList<ValidationBehavior> _validationBehaviors;
public static readonly BindableProperty IsValidProperty =
BindableProperty.Create("IsValid",