Skip to content

Instantly share code, notes, and snippets.


Charles Roper charlesroper

View GitHub Profile
charlesroper / view.cshtml
Last active Apr 5, 2016
Calling a partial view macro
View view.cshtml
new {
"tag" = "h1",
"klass" = "page-name"
charlesroper / view.cshtml
Last active Apr 5, 2016
2016-03-23 A partial using ViewData arguments
View view.cshtml
var tag = ViewData["tag"].ToString();
var klass = ViewData["klass"].ToString();
<@tag class="@klass">
@Umbraco.Field("pageNameOverride", altFieldAlias: "pageName")
charlesroper / callPartialWithViewDataDictionary.cshtml
Last active Mar 23, 2016
2016-03-23 Calling a partial with a ViewDataDictionary parameter
View callPartialWithViewDataDictionary.cshtml
new ViewDataDictionary {
{"tag", "h1"},
{"klass", "page-name"}
charlesroper / pageName.cshtml
Last active Mar 29, 2016
2016-03-23 A very simple Umbraco partial view
View pageName.cshtml
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
<h1 class="page-name">
@Umbraco.Field("pageNameOverride", altFieldAlias: "pageName")
spring = london.ix[datetime(2014,3,1) : datetime(2014,5,31)]
spring['Mean Humidity'].plot(
figsize=(10, 5),
title="Mean humidity during spring (March, April and May)")
# Another way of doing it...
springHumidity = london['Mean Humidity'].ix[
datetime(2014,3,1) : datetime(2014,5,31)]
View gist:21904dd8c66979be2072
Package Control Messages
What's new in v2.7.0
If you like this plugin and would like to support its development please consider donating through a [paypal donation] or using [gratipay].
View gist:2259006f92dc8ea75bb9
Windows PowerShell
Copyright (C) 2015 Microsoft Corporation. All rights reserved.
GIT_SSH set to C:\Users\Charles\Dropbox\Software\Putty\plink.exe, using Pageant as SSH agent.
Charles@LENOVO-T540P ~\Dev\Umbraco\build [dev-v7]
PS > ls
Directory: C:\Users\Charles\Dev\Umbraco\build
Mode Last Write Time Length Name
View multiplesOf3And5.csx
var mult1 =
from m in Enumerable.Range(1, 999)
where m % 3 == 0 || m % 5 == 0
select m;
Console.WriteLine((from m in Enumerable.Range(1, 999) where m % 3 == 0 || m % 5 == 0 select m).Sum());
var mult2 = Enumerable.Range(1, 999)
.Where(m => m % 3 == 0 || m % 5 == 0)
View gist:726d2df8d769920966ee
$scope.gridOptions = {
enableFiltering: true,
showGridFooter: true,
enableColumnResizing: true,
columnDefs: [
{ field: "ContactNumber", displayName: "ContactNumber", enableCellEdit: false, cellTooltip: true, width:"*" },
{ field: "OrganisationName", displayName: "Organisation", enableCellEdit: false, cellTooltip: true, width:"*" },
{ field: "LastStartDate", displayName: "Start Date", enableCellEdit: false, cellFilter: dateFilter, width:"*" },
{ field: "Venue", enableCellEdit: false },
charlesroper / poshgit-error.txt
Last active Aug 29, 2015
Chocolatey poshgit install error.
View poshgit-error.txt
PS C:\Users\Charles> cinst poshgit
The next version of Chocolatey (v0.9.9) will require -y to perform
behaviors that change state without prompting for confirmation. Start
using it now in your automated scripts.
For details on the all new Chocolatey, visit
Chocolatey (v0.9.8.33) is installing 'poshgit' and dependencies. By installing you accept the license for 'poshgit' and each dependency you are installing.
poshgit v0.5.0.201401009
You can’t perform that action at this time.