This file contains 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 static class PreprocessorSymbols | |
{ | |
public static string StringList => string.Join("; ", ArrayOfSymbols); | |
public static readonly string[] ArrayOfSymbols = new string[] | |
{ | |
#if NETFRAMEWORK | |
"NETFRAMEWORK", | |
#endif | |
This file contains 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
// | |
// This code is referenced in the following blog posts: | |
// * https://colinmackay.scot/2018/08/17/ensure-controller-actions-classes-have-authorisation/ | |
// | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Threading.Tasks; |
This file contains 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
function Invoke-CallOperator | |
{ | |
[CmdletBinding(DefaultParameterSetName="Verbose")] | |
param | |
( | |
[parameter(Mandatory=$true)] | |
[string]$ExeFilePath, | |
[parameter(Mandatory=$true)] |
This file contains 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
/* | |
This is a custom css file for Chrome. It can be used to create an | |
initial stylesheet for a document. | |
It should be placed in the following location: | |
Windows: C:\Users\<user>\AppData\Local\Google\Chrome\User Data\Default\User StyleSheets | |
Mac: Mac: ~/Library/Application Support/Google/Chrome/Default/User StyleSheets/Custom.css | |
Linux (Chromium): ~/.config/chromium/Default/User StyleSheets/Custom.css |
This file contains 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
function getData() { | |
var result = [{"Date":"1948-06-01","Rpi":9.7,"Cpi":null,"BoeRate":2},{"Date":"1948-07-01","Rpi":7.2,"Cpi":null,"BoeRate":2},{"Date":"1948-08-01","Rpi":7.9,"Cpi":null,"BoeRate":2},{"Date":"1948-09-01","Rpi":7.6,"Cpi":null,"BoeRate":2},{"Date":"1948-10-01","Rpi":7,"Cpi":null,"BoeRate":2},{"Date":"1948-11-01","Rpi":5.1,"Cpi":null,"BoeRate":2},{"Date":"1948-12-01","Rpi":4.9,"Cpi":null,"BoeRate":2},{"Date":"1949-01-01","Rpi":4.6,"Cpi":null,"BoeRate":2},{"Date":"1949-02-01","Rpi":2.9,"Cpi":null,"BoeRate":2},{"Date":"1949-03-01","Rpi":2.3,"Cpi":null,"BoeRate":2},{"Date":"1949-04-01","Rpi":0.6,"Cpi":null,"BoeRate":2},{"Date":"1949-05-01","Rpi":2.6,"Cpi":null,"BoeRate":2},{"Date":"1949-06-01","Rpi":1.3,"Cpi":null,"BoeRate":2},{"Date":"1949-07-01","Rpi":3,"Cpi":null,"BoeRate":2},{"Date":"1949-08-01","Rpi":3.1,"Cpi":null,"BoeRate":2},{"Date":"1949-09-01","Rpi":3.2,"Cpi":null,"BoeRate":2},{"Date":"1949-10-01","Rpi":3.6,"Cpi":null,"BoeRate":2},{"Date":"1949-11-01","Rpi":3.3,"Cpi":null,"BoeRate":2},{ |
This file contains 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
// Data source: http://www.guardian.co.uk/news/datablog/2011/feb/23/british-tourist-attractions-visitor-figures | |
// Usages of this gist: http://colinmackay.co.uk/tag/kendo-ui/ | |
function getData() | |
{ | |
var result = [{"Site":"British Museum","Visitors":5842138,"FreeCharge":"F","Change":0.05},{"Site":"Tate Modern","Visitors":5061172,"FreeCharge":"F","Change":0.07},{"Site":"National Gallery","Visitors":4954914,"FreeCharge":"F","Change":0.04},{"Site":"Natural History Museum","Visitors":4647613,"FreeCharge":"F","Change":0.13},{"Site":"Science Museum (South Kensington)","Visitors":2751902,"FreeCharge":"F","Change":-0.01},{"Site":"V&A (South Kensington)","Visitors":2629065,"FreeCharge":"F","Change":0.16},{"Site":"National Maritime Museum","Visitors":2419802,"FreeCharge":"F","Change":0.02},{"Site":"Tower of London (HRP)","Visitors":2414541,"FreeCharge":"C","Change":0.01},{"Site":"St Paul\u0027s Cathedral","Visitors":1892467,"FreeCharge":"F/C","Change":0.04},{"Site":"National Portrait Gallery","Visitors":1819442,"FreeCh |
This file contains 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
-- For more information about this script and how to use it, visit: | |
-- http://colinmackay.co.uk/2012/06/15/creating-a-data-dictionary-with-sql-server-and-mediawiki-part-two-a-list-of-columns/ | |
-- Edit these parameters to suit your needs. | |
DECLARE @catalogue SYSNAME = 'AdventureWorks'; | |
DECLARE @schema SYSNAME = 'Production' | |
DECLARE @table SYSNAME = 'Product' | |
This file contains 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
-- For more information about this script and its uses, visit: | |
-- http://colinmackay.co.uk/2012/06/14/creating-a-data-dictionary-with-sql-server-and-mediawiki-part-one-a-list-of-tables/ | |
DECLARE @Type NVARCHAR(100) = 'BASE TABLE' -- 'VIEW' OR 'BASE TABLE' | |
DECLARE @catalogue SYSNAME; | |
DECLARE @schema SYSNAME; | |
DECLARE @name SYSNAME; | |
SET NOCOUNT ON |