Skip to content

Instantly share code, notes, and snippets.

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

Andre Baltieri andrebaltieri

🏠
Working from home
View GitHub Profile
<script>
alert('teste');
</script>
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.ps1'))"
using Microsoft.AspNet.Mvc;
using System.Collections.Generic;
public class CustomerController : Controller
{
public JsonResult Get()
{
List<Customer> customers = new List<Customer>();
customers.Add(new Customer(1, "André", "Baltieri"));
return Json(customers);
public class CustomerController : ApiController
{
private ICustomerRepository repository;
public CustomerController(){
repository = new CustomerRepository();
}
// Meu código
}
public class CustomerController : ApiController
{
private ICustomerRepository _repository;
public CustomerController(ICustomerRepository repository){
_repository = repository;
}
// Meu código
}
using Microsoft.Practices.Unity;
using System;
using System.Collections.Generic;
using System.Web.Http.Dependencies;
namespace CustomerService.Utils.Helpers
{
public class UnityResolver : IDependencyResolver
{
protected IUnityContainer container;
// DI
var container = new UnityContainer();
container.RegisterType<IUserRepository, UserRepository>(new HierarchicalLifetimeManager());
container.RegisterType<ICustomerRepository, CustomerRepository>(new HierarchicalLifetimeManager());
config.DependencyResolver = new UnityResolver(container);
<!-- Favicon -->
<!-- Created with http://www.xiconeditor.com/ -->
<link rel="shortcut icon" href="favicon.ico" />
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<link rel="icon" sizes="196x196" href="content/img/res/android/196x196.gif">
<!-- Add to homescreen for Safari on iOS -->
<link rel="apple-touch-icon" href="content/img/res/ios/196x196.gif">
(function() {
'use strict';
angular
.module('app')
.directive('loading', loading);
loading.$inject = ['$window'];
function loading ($window) {