Skip to content

Instantly share code, notes, and snippets.

View angelobelchior's full-sized avatar
🏠
Working from home

Angelo Belchior angelobelchior

🏠
Working from home
View GitHub Profile
@angelobelchior
angelobelchior / easing.sketch.cs
Created February 16, 2015 21:04
Sketch Xamarin.Forms Easing
// Sketch your next great idea!
using System;
using Xamarin.Forms;
var box = new BoxView(){Color = Color.Blue};
var go = new Button(){ Text = "Go" };
var back = new Button(){ Text = "Clear" };
@angelobelchior
angelobelchior / operador.cs
Created October 30, 2014 13:32
Reescrita de Operador
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApplication1
{
class Program
{
@angelobelchior
angelobelchior / RemovePluralizingTableNameConvention.cs
Created April 13, 2014 20:42
Removendo a Pluralização das Tabelas no EF
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
}
namespace System
{
public static class DateTimeExtentions
{
public static bool IsWeekend(this DateTime self)
{
return (self.DayOfWeek == DayOfWeek.Sunday || self.DayOfWeek == DayOfWeek.Saturday);
}
public static bool IsLeapYear(this DateTime self)
using System.Collections.Generic;
namespace System
{
public static class FuncExtentions
{
public static Func<T, TResult> Memoize<T, TResult>(this Func<T, TResult> func)
{
var cache = new Dictionary<T, TResult>();
Func<T, TResult> memoizeFunc = n =>
using System.Collections.Generic;
using System.Linq;
namespace System
{
public static class IEnumerableExtensions
{
public static void ForEach<T>(this IEnumerable<T> source, Action<T> action)
{
Throw.IfIsNull(action);
using System.Linq;
using System.Text;
namespace System
{
public static class StringExtentions
{
public static string RemoveNonNumeric(this string self)
{
Throw.IfIsNullOrEmpty(self);
namespace System
{
public static class IntExtentions
{
#region [ Times ]
public static void Times(this int self, Action action)
{
Throw.IfIsNull(action);
Throw.IfLessThanOrEqZero(self);
using System;
using System.Configuration;
using System.Linq;
namespace Configuration
{
public static class AppSetting
{
public static bool GetBoolean(string key, bool defaultValue = false)
{
using System;
using System.Security.Cryptography;
namespace Cryptography
{
public class RSA
{
public static string Encrypt(string text, string key)
{
Throw.IfIsNullOrEmpty(text);