Skip to content

Instantly share code, notes, and snippets.

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

William Rodriguez wsrzx

🏠
Working from home
View GitHub Profile
@wsrzx
wsrzx / EnumerableExtensions.cs
Last active August 29, 2015 14:26
A fast ToList().ForEach extensions to PCL
public static class EnumerableExtensions
{
public static void ForEach<T>(this IEnumerable<T> @this, Action<T> action)
{
foreach (T item in @this)
{
action(item);
}
}
}
@wsrzx
wsrzx / MasterDetailPageDemo.xaml
Created August 3, 2015 18:31
Xamarin Forms MasterDetalPage XAML
<MasterDetailPage xmlns="http://xamarin.com/schemas/2014/forms"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:view="clr-namespace:DemoApp.Views;assembly=DemoApp"
x:Class="DemoApp.Views.RootPage" Title="MasterDetailPage Demo">
<MasterDetailPage.Master>
<view:MainMenu />
</MasterDetailPage.Master>
<MasterDetailPage.Detail>
<view:HomePage />
</MasterDetailPage.Detail>
@wsrzx
wsrzx / gist:04bf9f7803e9da66ee84
Created January 14, 2016 21:23
my blockchain ID
Verifying that +williamsrz is my blockchain ID. https://onename.com/williamsrz
@wsrzx
wsrzx / simpleExample.cs
Created January 25, 2016 22:17
Multiple HttpPost method in Web API controller
public class MyController : ApiController
{
[HttpPost]
[ActionName("myfirstroute")]
public string MyFirstPostMethod(JObject userData)
{
// do your thing
}
[HttpPost]
@wsrzx
wsrzx / package.json
Created February 9, 2016 22:23
Como publicar um Web App construído com Node.JS no Azure App Service partindo do OSX
{
"name": "Partiu Azure",
"version": "0.0.1",
"description": "",
"main": "./server.js",
"engines": { "node": ">= 0.6.0" }
}
@wsrzx
wsrzx / index.php
Created February 10, 2016 14:27
Como publicar um Web App construído com PHP no Azure App Service partindo do OSX
<!DOCTYPE html>
<html>
<head>
<title>Partiu Azure, PHP</title>
</head>
<body>
<h1>Partiu Azure, PHP</h1>
<?php
@wsrzx
wsrzx / gist:824ccad68984862c26cf8b54ca7666c7
Last active September 1, 2020 12:00
MacOs Sierra nom error "-bash : npm: command not found"
sudo brew uninstall node
brew update
brew upgrade
brew cleanup
brew install node
sudo chown -R username /usr/local
brew link --overwrite node
sudo brew postinstall node
@wsrzx
wsrzx / Models.cs
Last active January 17, 2017 00:38
Models, construindo um aplicativo com Xamarin.Forms
using System;
namespace MonkeyApp.Models
{
public class BaseModel
{
public string Id { get; private set; } = Guid.NewGuid().ToString();
}
public class Content : BaseModel
@wsrzx
wsrzx / TheViewController.cs
Created June 26, 2017 13:16
UIView Tap Command Binding using MvvmCross
// add using MvvmCross.Binding.iOS.Views.Gestures;
var set = this.CreateBindingSet<TheViewController, TheViewModel>();
set.Bind (TheControl.Tap()).For(t => t.Command).To(vm => vm.TheCommand);
set.Apply();
@wsrzx
wsrzx / TheViewController.cs
Created June 26, 2017 13:16
UIView Tap Command Binding using MvvmCross
// add using MvvmCross.Binding.iOS.Views.Gestures;
var set = this.CreateBindingSet<TheViewController, TheViewModel>();
set.Bind (TheControl.Tap()).For(t => t.Command).To(vm => vm.TheCommand);
set.Apply();