Skip to content

Instantly share code, notes, and snippets.

View claudiosanchez's full-sized avatar
🎯
Focusing

Claudio Sanchez claudiosanchez

🎯
Focusing
View GitHub Profile
@claudiosanchez
claudiosanchez / gist:5385463
Created April 15, 2013 03:17
How to parse a json payload with JSON.NET
/* ge the payload loaded onto the json variable */
var array = JArray.Parse(json);
/* process the array to map the content to some model */
@claudiosanchez
claudiosanchez / GetAzureObject
Created May 21, 2013 05:40
Generic Method for Getting Azure Objects
public static T GetAzureObject<T>(string subscriptionId, string storageName, string uriFormat, params object[] parameters) where T:class, T:new()
{
var service = default(T);
var requestUri = new Uri (string.Format(uriFormat, parameters));
var httpResponse = PerformHttpCall (subscriptionId, storageName);
var serializer = new XmlSerializer (T);
using (var memStream = new MemoryStream(Encoding.UTF8.GetBytes(httpResponse)))
{
@claudiosanchez
claudiosanchez / GeoDataDeRD
Created June 11, 2013 18:49
Json con Provincia -> Cuidad -> Minicipio de Rep. Dominicana.
{"1":{"Pais":"Republica Dominicana","Provincia":{"1":{"Nombre":"Distrito Nacional","Capital":"Santo Domingo de Guzmán"},"2":{"Nombre":"Azua","Capital":"Azua de Compostela","Municipio":{"1":{"Nombre":"Azua de Compostela","Distrito":{"1":"Barreras ","2":"Barro Arriba ","3":"Clavellina ","4":"Emma Balaguer Viuda Vallejo ","5":"Las Barías-La Estancia ","6":"Las Lomas ","7":"Los Jovillos ","8":"Puerto Viejo"}},"2":{"Nombre":"Estebanía"},"3":{"Nombre":"Guayabal"},"4":{"Nombre":"Las Charcas","Distrito":{"9":"Hatillo ","10":"Palmar de Ocoa"}},"5":{"Nombre":"Las Yayas de Viajama","Distrito":{"11":"Villarpando ","12":"Hato Nuevo-Cortés"}},"6":{"Nombre":"Padre Las Casas","Distrito":{"13":"La Siembra ","14":"Las Lagunas ","15":"Los Fríos"}},"7":{"Nombre":"Peralta"},"8":{"Nombre":"Pueblo Viejo","Distrito":{"16":"El Rosario"}},"9":{"Nombre":"Sabana Yegua","Distrito":{"17":"Proyecto 4 ","18":"Ganadero ","19":"Proyecto 2-C"}},"10":{"Nombre":"Tábara Arriba","Distrito":{"20":"Amiama Gómez ","21":"Los Toros ","22":"Tábara Abajo
@claudiosanchez
claudiosanchez / Easy Json To Pocos
Created June 17, 2013 15:51
Need to get Json data from a web service; As Easy as 1-2-3 with Json.NET, C# 5.0 and async.
//
// WebDataHelper.cs
//
// Author:
// Claudio Sanchez <claudio@megsoftconsulting.com>
//
// Copyright (c) 2013 Megsoft Consulting Inc
//
//
using System;
@claudiosanchez
claudiosanchez / Binder
Last active August 29, 2015 13:56
A Binding (MVVM style) for Xamarin.iOS. Allows to do stuff like _textbox.Bind("Changed","Text", _=> model.Description, twoWayBinding:true);
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Linq.Expressions;
using Framework.Binding;
using Framework.ViewModel;
using Framework.iOS.Navigation;
...
// _repository is a GenericRepository<Villa>.
var villas = _repository
.Get(
q => q.Select(s => new VillaDto {
Id = s.PodId,
Name = s.Name,
Price=s.Price,
@claudiosanchez
claudiosanchez / XamarinDev.md
Last active August 29, 2015 13:58 — forked from gotjosh/gist:8105782
Xamarin Mobile Developer position with Megsoft Consulting Inc

Megsoft Consulting - Xamarin Mobile Developer.

Hello dude,

We are currently expanding, and are looking to bring on another compadre (or comadre) to Megsoft Consulting Inc. We're a company that has been profitable since day 0; we had an amazing year and continue to grow on a steady pace.

Our quest searching for a passionate and savvy Mobile developer has just begun.

The lucky developer will have the responsibility of working in exciting and innovative solutions in the mobile space from our office in Santo Domingo, Dominican Republic or remotely (for the right candidate). You'll be expected to not only to write code but also provide your insight on projects and technologies used, as well as taking ownership of the projects you work on.

@claudiosanchez
claudiosanchez / gist:10927605
Created April 16, 2014 20:06
Para que Ahmed no se tenga que matar buscando como se hace esto con su IoC Container mal documentado.
public class ComidaMasticadaParaAHmedModule : NinjectModule
{
public override void Load()
{
Bind(typeof(IRepository<>)).To(typeof(Repository<>));
}
}

Megsoft Consulting - Mobile Developer Intern.

Hello dude,

We are currently expanding, and are looking to bring on another aspiring compadre (or comadre) to Megsoft Consulting Inc. We're a company that has been profitable since day 0; we had an amazing year and continue to grow on a steady pace.

Our quest searching for a passionate and savvy Mobile developer intern has just begun.

The lucky intern will have the responsibility of working in exciting and innovative solutions in the mobile space from one of ours offices or remotely. You'll be expected to not only to writecode but also to help out in other company tasks.

@claudiosanchez
claudiosanchez / qa_engineer.md
Last active August 29, 2015 14:12
QA Engineer

Megsoft Consulting - Quality Assurance Engineer.

Hello,

Megsoft Consulting Inc is looking for a QA Engineer who is excited about working with new technologies and is looking to leave a mark in products and services used by hundreds of thousands.

The QA Engineer will be helping us in performing tests on the products we are developing while helping improve our process. We are looking to automate most of the testing, so writing code would be a plus.

What are we looking in a Candidate?