Skip to content

Instantly share code, notes, and snippets.

View pvandervelde's full-sized avatar

Patrick van der Velde pvandervelde

View GitHub Profile
<?xml version="1.0" encoding="utf-8"?>
<Project
DefaultTargets="MindVortex_Build_Wyam_Run"
ToolsVersion="11.0"
xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import
Condition="Exists('$(DirNBuildKitMsBuildShared)\shared.importbuildsharedsettings.props') AND '$(ExistsSharedImportBuildSharedSettings)' != 'true' "
Project="$(DirNBuildKitMsBuildShared)\shared.importbuildsharedsettings.props" />
# Notes:
# - Minimal appveyor.yml file is an empty file. All sections are optional.
# - Indent each level of configuration with 2 spaces. Do not use tabs!
# - All section names are case-sensitive.
# - Section names should be unique on each level.
#---------------------------------#
# general configuration #
#---------------------------------#
<!--
Model is: Tuple<IDocument, IDocument>.
The first one is the current document that is being rendered, the second one is the one for which the post header should be rendered.
-->
@model System.Tuple<Wyam.Common.Documents.IDocument, Wyam.Common.Documents.IDocument>
@{
var Published = Model.Item2.Get<DateTime>(BlogKeys.Published);
var Tags = Model.Item2.Get<string[]>(BlogKeys.Tags);
}
@{
foreach(IDocument doc in Documents[BlogPipelines.RawPosts].Take(5))
{
<div id="post-spacer">
<div id="post">
<div id="post-header">
@Html.Partial("_PostHeader.cshtml", Tuple.Create(Model, doc))
</div>
<div id="post-content">
@Html.Raw(doc.Content)
@{
string Title = Model.String(BlogKeys.Title);
string PageTitle = Context.String(BlogKeys.Title) + (string.IsNullOrWhiteSpace(Title) ? string.Empty : " - " + Title);
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
@{
var pages = Documents[BlogPipelines.Pages]
.Where(x => x.Get<bool>(BlogKeys.ShowInNavbar, true))
.Select(
x =>
{
var order = x.Get<int>("Order");
order = (order != 0) ? order : 1000;
var link = Context.GetLink(x);
<div>
<div class="navlinks">
@{
var previousIndex = -1;
var nextIndex = -1;
var list = Documents[BlogPipelines.RawPosts].Where(x => x.ContainsKey("Published")).OrderByDescending(x => x.Get<DateTime>("Published")).ToList();
for(int i = 0; i < list.Count; i++)
{
var doc = list[i];
@pvandervelde
pvandervelde / ChangeVariableTypeFail.ps1
Created January 28, 2016 19:15
Powershell changing type
function ChangeType
{
[CmdletBinding()]
param (
[string] $input
)
$ErrorActionPreference = "Stop"
$input = $input.Split(',')
@pvandervelde
pvandervelde / OutputAndError.txt
Created June 3, 2015 08:37
Stackstorm installation on Ubuntu console output.
# Detected Distro is Ubuntu
Downloading deployment script from: https://downloads.stackstorm.net/releases/st2/0.9.0/debs/st2_deploy.sh...
Running deployment script for St2 0.9.0...
######################################################################
###### WARNING #######
######################################################################
This scripts allows you to evaluate StackStorm on a single server and
is not intended to be used for production deployments.
@pvandervelde
pvandervelde / New-AzureSyspreppedVMImage.ps1
Created November 10, 2014 08:47
Syspreps an Azure VM and then creates an image from it.
<#
.SYNOPSIS
Syspreps an Azure VM and then creates an image from it.
.DESCRIPTION
The New-AzureSyspreppedVMImage function executes sysprep on a given Azure VM and then once the VM is shut down creates an image from it.