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 | |
#http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/rss/mp4high/?sort=sequential&direction=desc&term=&r=Developer+Tools+%26+Application+Lifecycle+Management&r=Windows+Azure+Application+Development&y=Breakout&Media=true#fbid=FDnmapgI5Hf | |
#http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/RSS/mp4high | |
#http://channel9.msdn.com/Events/Build/2013/RSS/mp4high#theSessions | |
#http://channel9.msdn.com/Events/TechEd/NorthAmerica/2013/rss/mp4high/?sort=sequential&direction=desc&term=&r=Developer+Tools+%26+Application+Lifecycle+Management&r=Windows+Azure+Application+Development&y=Breakout&Media=true#fbid=FDnmapgI5Hf | |
$a = ([xml]$rss.downloadstring("http://channel9.msdn.com/Events/Build/2013/RSS/mp4high#theSessions")) | |
$a.rss.channel.item | foreach{ |
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
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin | |
cinst hexter.octopus | |
"c:\Program Files (x86)\Octopus\Tools\Tools.exe" |
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
#install-package Microsoft.Web.Xdt -Prerelease | |
var doc = new XmlTransformableDocument(); | |
doc.Load(@"..\..\..\www\web.config"); | |
var t = new XmlTransformation(@"..\..\..\www\web.ci.config"); | |
if (t.Apply(doc)) | |
{ | |
doc.Save("foobar.xml"); |
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()); |
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; | |
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
[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 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
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
public class HomeViewModel | |
{ | |
public IList<Device> Devices { get; set; } | |
public IList<Scene> Scenes { get; set; } | |
} |