This file contains hidden or 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
# Clean up backup and loose objects. | |
git for-each-ref --format='delete %(refname)' refs/original | git update-ref --stdin | |
git reflog expire --expire=now --all | |
git gc --prune=now | |
# 全ての履歴に .gitignore / .gitattributes を追加する | |
git filter-branch --index-filter "cp -t ./ ../.gitignore ../.gitattributes && git add .gitignore .gitattributes" -f -- --all |
This file contains hidden or 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
npm list -g --depth 0 |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Single Page Apps for GitHub Pages</title> | |
<script type="text/javascript"> | |
// Single Page Apps for GitHub Pages | |
// https://github.com/rafrex/spa-github-pages | |
// Copyright (c) 2016 Rafael Pedicini, licensed under the MIT License | |
// ---------------------------------------------------------------------- |
This file contains hidden or 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
/** | |
* Safari 10.1 supports modules, but does not support the `nomodule` attribute - it will | |
* load <script nomodule> anyway. This snippet solve this problem, but only for script | |
* tags that load external code, e.g.: <script nomodule src="nomodule.js"></script> | |
* | |
* Again: this will **not** prevent inline script, e.g.: | |
* <script nomodule>alert('no modules');</script>. | |
* | |
* This workaround is possible because Safari supports the non-standard 'beforeload' event. | |
* This allows us to trap the module and nomodule load. |
This file contains hidden or 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
<#@ template debug="true" hostspecific="true" language="C#" #> | |
<#@ output encoding="utf-8" extension=".cs"#> | |
<#@ assembly name="EnvDTE" #> | |
<#@ assembly name="EnvDTE80" #> | |
<#@ assembly name="System.Core" #> | |
<#@ assembly name="System.Configuration" #> | |
<#@ import namespace="System.Collections.Generic" #> | |
<#@ import namespace="System.Configuration" #> | |
<#@ import namespace="System.Text.RegularExpressions" #> | |
<#@ import namespace="EnvDTE" #> |
This file contains hidden or 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
# After problems with a company-wide ActiveDirectory shaker, all (local) SQL Server instances were FUBAR. | |
# This 'resets' the LocalDB sql instance. | |
sqllocaldb stop "v11.0" -k | |
sqllocaldb delete "v11.0" | |
sqllocaldb create "v11.0" | |
sqllocaldb start "v11.0" |
This file contains hidden or 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
MediatR | |
Simple mediator implementation in .NET for In-process messaging. | |
Supports request/response, commands, queries, notifications and events, synchronous and async with intelligent dispatching via C# generic variance. | |
https://github.com/jbogard/MediatR/wiki | |
Workflow | |
Workflow is kind of container for business logic. It could combine set of queries and commands into single operation which matters to end user. |
This file contains hidden or 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
namespace Cqrs.Domain | |
{ | |
using System; | |
using Messages; | |
public abstract class BaseAggregateRoot<TAggregate> : IAggregateRoot | |
where TAggregate : class, IAggregateRoot | |
{ | |
private static readonly IDispatchMessages<TAggregate> Dispatcher = new MessageDispatcher<TAggregate>(); |
This file contains hidden or 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
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.Transactions; | |
using Raven.Client; | |
using Raven.Client.Document; | |
using Raven.Client.Linq; | |
public class Program | |
{ |
This file contains hidden or 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 sealed class NServiceBusCommitDispatcher : IPublishMessages | |
{ | |
private const string AggregateIdKey = "AggregateId"; | |
private const string CommitVersionKey = "CommitVersion"; | |
private const string EventVersionKey = "EventVersion"; | |
private const string BusPrefixKey = "Bus."; | |
private readonly IBus bus; | |
public NServiceBusCommitDispatcher(IBus bus) | |
{ |