Shahed Nasser has created a Chrome extension that will let you enable Grammarly in Ghost as well!
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
// | |
// See: https://kentcdodds.com/blog/profile-a-react-app-for-performance#build-and-measure-the-production-app | |
// See: https://nextjs.org/docs/api-reference/next.config.js/custom-webpack-config | |
const TerserPlugin = require('next/dist/compiled/terser-webpack-plugin'); | |
module.exports = { | |
webpack: (config, options) => { | |
// | |
// Use profiler-enabled React builds |
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
/** | |
* Performance reporting for Knockout binding handlers | |
* | |
* Usage: Include after all bindings are declared, view console for results. | |
*/ | |
(function () { | |
var report = []; | |
var lastReport = 0; | |
var debounceWait = 500; |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// See: http://stackoverflow.com/questions/3441916/automapper-mapping-issue-with-inheritance-and-abstract-base-class-on-collection/5749579#5749579 | |
// | |
// For use with AutoMapper | |
public class ProxyConverter<TSource, TDestination> : ITypeConverter<TSource, TDestination> | |
where TSource : class | |
where TDestination : class | |
{ | |
public TDestination Convert(ResolutionContext context) | |
{ | |
// Get dynamic proxy base type |
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
var options = {}; | |
// jQuery options | |
// options.url = foo; | |
// CSRF Token | |
var csrfToken = $("input[name='__RequestVerificationToken']").val(); | |
if (csrfToken) { | |
options.headers = { |
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 class TestingContext { | |
private IKernel _kernel; | |
public TestingContext() { | |
// create initial Strict mock that can always be setup outside impersonation context | |
UserContext = new Mock<IUserContext>(MockBehavior.Strict); | |
// register dependencies | |
_kernel = CreateKernel(); |
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
// F12 Dev Tools and copy and paste into console! | |
// Stretches studio player 100% and chat below. | |
var studioPlayer = document.querySelector("studio-player"); | |
var studioVideo = document.querySelector( | |
".home-page__live-stream--content__video" | |
); | |
var chat = document.querySelector(".home-page__live-stream__info"); | |
if (studioPlayer && studioVideo && chat) { | |
studioPlayer.style.display = "block"; |
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
/** | |
* An extender that syncs the observable with the address | |
* bar (using hash fragment). Will load from URL hash or | |
* querystring (at time of creation) and will | |
* update hash when observable changes. | |
* | |
* Options: string|object | |
* String: Query parameter key to get/set | |
* Object: | |
* - param - Query parameter key to get/set |
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 task takes in a XDT transform file and transforms it, following any inheritance chain. | |
There should be at least one base transform for this to work; otherwise just use Microsoft's | |
regular TransformXml task. --> | |
<!-- EXAMPLE USAGE: | |
<TransformXmlHierarchy | |
Source="source.xml" | |
Destination="transformed.xml" | |
TaskDirectory="path/to/directory/of/Microsoft.Web.Publishing.Tasks" /> | |
--> | |
<UsingTask |
NewerOlder