

// Run this in your console with whatever `newColors` you choose. | |
function recolorContributionGraph(newColors) { | |
const days = [...document.querySelectorAll('.day')] | |
const legendItems = [...document.querySelectorAll('.legend > li')] | |
const colors = [ | |
...days.reduce((acc, day) => { | |
acc.add(day.getAttribute('fill')) | |
return acc | |
}, new Set()), | |
] |
using System; | |
using System.IO; | |
using System.Security.Cryptography; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Mvc.Filters; | |
using Newtonsoft.Json; | |
using Newtonsoft.Json.Bson; | |
// ReSharper disable once CheckNamespace |
[HttpPost] | |
public HttpResponseMessage CreateCustomer(string name, string billingInfo) | |
{ | |
Result<BillingInfo> billingInfoResult = BillingInfo.Create(billingInfo); | |
Result<CustomerName> customerNameResult = CustomerName.Create(name); | |
return Result.Combine(billingInfoResult, customerNameResult) | |
.OnSuccess(() => _paymentGateway.ChargeCommission(billingInfoResult.Value)) | |
.OnSuccess(() => new Customer(customerNameResult.Value)) | |
.OnSuccess( |
To remove a submodule you need to:
if (!window.console) { | |
(function() { | |
var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", | |
"group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"]; | |
window.console = {}; | |
for (var i = 0; i < names.length; ++i) { | |
window.console[names[i]] = function() {}; | |
} | |
}()); | |
} |