Skip to content

Instantly share code, notes, and snippets.


Martyn Jones MartynJones87

View GitHub Profile
MartynJones87 / sample.ts
Created Feb 21, 2017
Sample Typescript class structure
View sample.ts
export class SampleClass {
// Public class variables
name: string;
// Protected class variables
protected protectedName: string;
// Private class variables
private privateName: string;
View Slick Grid Aggregate Sorting Snippet.js
function groupByRegion() {
getter: "DealerName",
formatter: function(g) {
return g.value + " <span style='color:green'>(" + g.count + " items) Projected Overspend: " + accounting.formatMoney(g.totals.sum.ProjOverspend) + "</span>";
aggregators: [
new Slick.Data.Aggregators.Sum("ProjOverspend")
comparer: function(a, b) {
MartynJones87 / data.csv
Last active Jul 12, 2016
Grouped Bar Chart With Panning And Zooming Via Brushing
View data.csv
Country Year Cost
England 2011 30
England 2012 35
England 2013 45
England 2014 50
Wales 2010 43
Wales 2012 27
Wales 2013 29
Wales 2014 28
Scotland 2010 73
MartynJones87 / PostDeploy.ps1
Created Sep 20, 2012
Octopus Deploy Post-Deploy script to update connectionString attributes within an ASP.Net web.config file
View PostDeploy.ps1
# The following two lines were for debugging purposes to simulate the variables which are made available
# by Octopus when it invokes this script
#$OctopusParameters = @{}
#$OctopusParameters["DatabaseContext"] = "Data Source=DatabaseServer;Initial Catalog=Database;Integrated Security=true"
# This function is included because this function doesn't always seem to be available
# on freshly installed web servers when Octopus is deploying to. It is used to get the
# location where the script file is located, to allow the web.config file in the same
# location to be accessed.
function Get-ScriptDirectory {
MartynJones87 / MigrateUserDataFromSQLProviderSchemaToUniversalProviderSchema.sql
Created Jul 13, 2012
SQL Server Script To Migrate Membership Data From SQL Provider Schema To Universal Provider Schema
View MigrateUserDataFromSQLProviderSchemaToUniversalProviderSchema.sql
--The sample scripts provided here are not supported under any We Predict Ltd standard support program or service. All scripts are provided AS IS without warranty of any kind. We Predict Ltd further disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use or performance of the sample scripts and documentation remains with you. In no event shall We Predict Ltd, its authors, or anyone else involved in the creation, production, or delivery of the scripts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or other pecuniary loss) arising out of the use of or inability to use the sample scripts or documentation, even if We Predict Ltd has been advised of the possibility of such damages.
INSERT INTO dbo.Applications (ApplicationName, ApplicationId, Description)
SELECT ApplicationN