Skip to content

Instantly share code, notes, and snippets.

Helping people get paid

Ben Cull bjcull

Helping people get paid
Block or report user

Report or block bjcull

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
bjcull / mr-leesy.xml
Created Aug 19, 2019
Mr Leesy - BeerXML Recipe
View mr-leesy.xml
<?xml version="1.0" encoding="UTF-8"?>
<NAME>Mr Leesy</NAME>
<NAME>American IPA</NAME>
bjcull / white-rabbit-dark-ale-148190.xml
Created Aug 19, 2019
White Rabbit Dark Ale - Clone Recipe
View white-rabbit-dark-ale-148190.xml
<?xml version="1.0" encoding="UTF-8"?>
<NAME>White Rabbit Dark Ale</NAME>
<NAME>Northern English Brown Ale</NAME>
bjcull / paymentsInProcess.qry
Created Mar 29, 2019
SQL Output for my perhaps not so efficient query
View paymentsInProcess.qry
DECLARE @__submerchantId_0 int = 147;
DECLARE @__startDateLocal_Value_1 datetime2(7) = '2019-01-25';
DECLARE @__endDateLocal_Value_2 datetime2(7) = '2019-03-29';
DECLARE @__p_3 int = 0;
DECLARE @__p_4 int = 50;
SELECT [x.Payer].[Id], [x.Payer].[AssemblyBuyerId], [x.Payer].[CreatedTimeUtc], [x.Payer].[DisplayId], [x.Payer].[EmailAddress], [x.Payer].[FirstName], [x.Payer].[ImportSource], [x.Payer].[ImportSourceReference], [x.Payer].[IsDeleted], [x.Payer].[LastName], [x.Payer].[MobileNumber], [x.Payer].[Postcode], [x.Payer].[StreetAddress], [x.Payer].[SubMerchantId], [x.Payer].[Suburb], [x].[DisplayId] AS [Id0],
SELECT TOP(1) [y3].[Status]
FROM [Attempts] AS [y3]
bjcull / AddAllClaimAction.cs
Last active May 18, 2018
Adds all custom claims to the core identity
View AddAllClaimAction.cs
public class AddAllClaimAction : ClaimAction
public AddAllClaimAction() : base(null, null)
public override void Run(JObject userData, ClaimsIdentity identity, string issuer)
var claims = userData.Properties()
.Where(x => !x.Value.HasValues)
View AsExpandableExtension.cs
public static class AsExpandableExtension
public static IQueryable<T> AsExpandable<T>(this IQueryable<T> source)
if (source is ExpandableQuery<T>)
return (ExpandableQuery<T>)source;
bjcull / TimeService.cs
Created Nov 27, 2017
The current time service I use to keep track of dates relative to a certain timezone.
View TimeService.cs
public class TimeService : ITimeService
private readonly ILogger _logger;
private Instant? _frozenTime;
private Instant _realTimeAtTimeOfFreezing = Instant.MinValue;
private readonly IDateTimeZoneProvider _timeZoneProvider = DateTimeZoneProviders.Tzdb;
private readonly DateTimeZone _timeZone;
public TimeService(ILogger logger, string systemTimeZone, DateTime? setDate = null)
bjcull / Install-Seq.ps1
Last active Oct 26, 2017 — forked from dennisroche/Install-Seq.ps1
Download and install Seq ( Can be used by Azure Resource Manager template. Use RawGit to access the file with proper Content-Type headers -
View Install-Seq.ps1
param (
$installBasePath = "C:\Install\"
$global:seqDataPath = "C:\ProgramData\Seq"
function Write-Log
bjcull / ActiveRouteTagHelper.cs
Last active Jun 8, 2018 — forked from anonymous/ActiveRouteTagHelper.cs
Adds an "active" class to the given element when the route parameters match. An Active Route Tag Helper.
View ActiveRouteTagHelper.cs
[HtmlTargetElement(Attributes = "is-active-route")]
public class ActiveRouteTagHelper : TagHelper
private IDictionary<string, string> _routeValues;
/// <summary>The name of the action method.</summary>
/// <remarks>Must be <c>null</c> if <see cref="P:Microsoft.AspNetCore.Mvc.TagHelpers.AnchorTagHelper.Route" /> is non-<c>null</c>.</remarks>
public string Action { get; set; }
bjcull / loading-button.js
Created Jul 8, 2015
An angular directive for the Ladda loading button. (Requires the jquery ladda plugin).
View loading-button.js
.directive('loadingButton', [
'$compile', function($compile) {
return {
restrict: 'A',
link: function(scope, element, attr) {
/* == "data-style" */
if (attr.loadingButtonAnimation && ! {
element.attr("data-style", attr.loadingButtonAnimation);
} else if (!attr.loadingButtonAnimation && ! {
element.attr("data-style", "slide-left");
bjcull / ChartDraw.html
Created May 23, 2015
A prototype graph with user drawn lines over the top
View ChartDraw.html
<!DOCTYPE html>
<meta charset="utf-8" />
<script src=""></script>
<script src=""></script>
You can’t perform that action at this time.