👷♂️
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
using System.Linq; | |
using Microsoft.AspNet.Builder; | |
using Microsoft.AspNet.Hosting; | |
using Microsoft.AspNet.Mvc; | |
using Microsoft.Framework.DependencyInjection; | |
using Newtonsoft.Json.Serialization; | |
namespace MyNamespace.Controllers | |
{ |
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
describe('when getting configuration from backend', function () { | |
beforeEach(inject(function ($injector) { | |
$httpBackend = $injector.get("$httpBackend"); | |
$httpBackend.expect("GET", "/api/config") | |
.respond(200, configMock); | |
})); | |
afterEach(function () { |
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
Create a hfs+ usb stick on Ubuntu: | |
sudo apt-get install hfsprogs | |
sudo apt-get install gparted | |
using gparted, create a partition table and a partition, format the partition table to hfs+ | |
Boot the MBP to Single User Mode using ⌘+S key on power on | |
When booted: | |
/sbin/fsck -fy | |
/sbin/mount -uw / |
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
Bar.cs | |
+-BarSpecs.cs | |
Foo.cs | |
+- FooSpecs.cs | |
vs. | |
Bar.cs | |
BarSpecs.cs (with common Bar related IBehaviorConfigs) | |
+- when_bar_has_this.cs |
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
C:\Users\AZeitler\Desktop\xunitbddextensions>powershell -Command "& {Import-Modu | |
le .\psake.psm1; Invoke-psake .\default.ps1}" | |
Executing task: Clean | |
Executing task: Init | |
fatal: Not a git repository (or any of the parent directories): .git | |
default.ps1:You cannot call a method on a null-valued expression. | |
C:\Users\AZeitler\Desktop\xunitbddextensions>Pause | |
Press any key to continue . . . |
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
// Concern | |
protected override void Because() { | |
_actualDependencyModel = Sut.Resolve(); // "root" of AssemblyHasTwoPartDependencies / EstablishContext should be passed to Resolve | |
} | |
// Dependency | |
public class AssemblyHasTwoPartDependencies : IBehaviorConfig { | |
public void EstablishContext(IDependencyAccessor accessor) { | |
IConfiguration activeRootConfiguration = accessor.An<IConfiguration>(); |
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
version: grunt-cli v0.1.8 | |
1. Install node-inspector globally (-g) | |
npm install -g node-inspector | |
2. Add debugger statements to your code | |
3. Run your grunt task in debug mode |
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
VBoxManage modifyvm "default" --natpf1 "postgres,tcp,127.0.0.1,5432,,5432" |
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
using System; | |
using System.Collections.Concurrent; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Threading.Tasks.Dataflow; | |
namespace TDFDemo | |
{ | |
class Program | |
{ |
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
// Dependency resolution, adapted from https://gist.github.com/1232505/f16308bc14966c8d003c2686b1c258ec41303c1f | |
function resolve(graph) { | |
var sorted = [], // sorted list of IDs ( returned value ) | |
visited = {}; // hash: id of already visited node => true | |
// 2. topological sort | |
Object.keys(graph).forEach(function visit(name, ancestors) { | |
if (!Array.isArray(ancestors)) ancestors = []; | |
ancestors.push(name); | |
visited[name] = true; |