Skip to content

Instantly share code, notes, and snippets.

View MartynJones87's full-sized avatar

Martyn Jones MartynJones87

View GitHub Profile
@MartynJones87
MartynJones87 / MigrateUserDataFromSQLProviderSchemaToUniversalProviderSchema.sql
Created July 13, 2012 13:23
SQL Server Script To Migrate Membership Data From SQL Provider Schema To Universal Provider Schema
--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
@MartynJones87
MartynJones87 / PostDeploy.ps1
Created September 20, 2012 12:10
Octopus Deploy Post-Deploy script to update connectionString attributes within an ASP.Net web.config file
# 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
MartynJones87 / data.csv
Last active July 12, 2016 10:00
Grouped Bar Chart With Panning And Zooming Via Brushing
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
MartynJones87 / Slick Grid Aggregate Sorting Snippet.js
Created January 22, 2015 14:31
Slick Grid Aggregate Sorting Snippet
function groupByRegion() {
dataView.setGrouping([{
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
MartynJones87 / sample.ts
Created February 21, 2017 12:00
Sample Typescript class structure
export class SampleClass {
// Public class variables
name: string;
// Protected class variables
protected protectedName: string;
// Private class variables
private privateName: string;