Skip to content

Instantly share code, notes, and snippets.

View CuriousCurmudgeon's full-sized avatar

Brian Meeker CuriousCurmudgeon

View GitHub Profile
var tiles = await _tileService.LoadTilesAsync();
var tileViewModels = Mapper.Map<IList<TileViewModel>>(tiles);
Mapper.CreateMap<Tile, TileViewModel>()
.ConstructUsingServiceLocator();
Mvx.RegisterType<TileViewModel, TileViewModel>();
// Tell AutoMapper to resolve dependencies using MvvmCross's service locator.
Mapper.Configuration.ConstructServicesUsing(Mvx.Resolve);
@CuriousCurmudgeon
CuriousCurmudgeon / TileViewModel.cs
Last active August 29, 2015 14:15
TileViewModel
public class TileViewModel : MvxViewModel
{
private readonly ITileService _tileService;
public TileViewModel(ITileService tileService)
{
_tileService = tileService;
}
private string _color;
#!/usr/bin/env bash
# call like this on the target server:
# NODENAME='foo' CHEF_ENV='production' RUNLIST='["role[foo]","recipe[bar]"]' CHEFREPO='git@example.com:repo.git' bash <( curl -L https://raw.github.com/gist/1026628 )
# You will need to ensure that the ssh key is already set up on the server.
set -e
export CHEF_DIR="${HOME}/chef"
sudo rm -rf $CHEF_DIR
mkdir -p "$CHEF_DIR"