This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy -ExecutionPolicy Unrestricted;$a=new-object net.webclient;$a.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials;$a.downloadstring('http://bit.ly/OKgXHP')|iex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
view sourceprint? | |
1 | |
@rem installer.cmd | |
2 | |
SET WebPiCmd=.\webpicmd\WebPiCmd.exe | |
3 | |
%WebPiCmd% /Install /Products:NETFramework4 /AcceptEula | |
4 | |
%WebPiCmd% /Install /Products:SQLExpress /SQLPassword:P@ssw0rd /AcceptEula |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
#Set the username for windows auth proxy | |
$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials | |
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/Build/2012/RSS/wmvhigh")) | |
$a.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + ".wmv" | |
if (!(test-path $file)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeViewModel | |
{ | |
public IList<Device> Devices { get; set; } | |
public IList<Scene> Scenes { get; set; } | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
DeviceRepository _repository = new DeviceRepository(); | |
SceneRepository _sceneRepository = new SceneRepository(); | |
public Actio01nResult Index() | |
{ | |
HomeViewModel model = new HomeViewModel(); | |
model.Devices = _repository.GetAll(); | |
model.Scenes = _sceneRepository.GetAll(); | |
return View(model); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using UI.Controllers | |
@using UI.Models | |
@model UI.Controllers.HomeViewModel | |
@{ | |
ViewBag.Title = "Lighting"; | |
} | |
<h2>Hexter's</h2> | |
<div id="heartbeat" data-bind="text: Heartbeat"></div> | |
<div class="ui-grid-a"> | |
<div class="ui-block-a"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Environment]::CurrentDirectory=(Get-Location -PSProvider FileSystem).ProviderPath | |
$rss = (new-object net.webclient) | |
#Set the username for windows auth proxy | |
$rss.proxy.credentials=[system.net.credentialcache]::defaultnetworkcredentials | |
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/WindowsAzureConf/2012/RSS/mp4high")) | |
$a.rss.channel.item | foreach{ | |
$url = New-Object System.Uri($_.enclosure.url) | |
$file = $_.creator + "-" + $_.title.Replace(":", "-").Replace("?", "").Replace("/", "-") + ".mp4" | |
if (!(test-path $file)) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
// You need to add this using statement to use the MapNavigationRoute extension method. | |
using NavigationRoutes; | |
namespace MvcApplication13 | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var routes = new System.Web.Routing.RouteCollection(); | |
routes.MapNavigationRoute<HomeController>("Home", c => c.Index()) | |
.AddChildRoute<HomeController>("Logout", c => c.Logout()) | |
.AddChildRoute<HomeController>("Foobar", c => c.ChangePassword()); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using Newtonsoft.Json; | |
namespace UI.Models | |
{ | |
public static class ObjectExtensions | |
{ | |
public static string ToJson(this object obj) | |
{ | |
JsonSerializer js = JsonSerializer.Create(new JsonSerializerSettings()); |
OlderNewer