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
db.currentOp().inprog.forEach( | |
function(op) { | |
if(op.secs_running > 5) printjson(op); | |
} | |
) |
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
let emptyIfZero f x = | |
match x with | |
| 0 -> [] | |
| _ -> f x | |
let elementsBetween0And20 = emptyIfZero (fun x -> [ string x ]) | |
let elementsBetween21And99 x = string (x - (x % 10)) :: elementsBetween0And20 (x % 10) | |
let ifGreaterThan y f g x = if x > y then f x else g x | |
let elementsFor2DigitNumber = ifGreaterThan 20 elementsBetween21And99 elementsBetween0And20 | |
let elementsBetween100And999 x = string (x / 100) :: "hundred" :: emptyIfZero (fun x -> "and" :: elementsFor2DigitNumber x) (x % 100) |
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.IO; | |
using System.Linq; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Text.RegularExpressions; | |
using System.Data.Entity; | |
using System.Data.Entity.Core.EntityClient; | |
using System.Data.Entity.Infrastructure; | |
using System.Diagnostics; |
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 static void Dump(ZmqSocket socket, Encoding encoding) | |
{ | |
if (socket == null) { | |
throw new ArgumentNullException("socket"); | |
} | |
Console.WriteLine(new String('-', 38)); | |
ZmqMessage message = socket.ReceiveMessage(); | |
foreach (var frame in message) | |
{ |
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
<?xml version="1.0" encoding="utf-8"?> | |
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
<PropertyGroup Condition="'$(ToolsDir)' == ''"> | |
<ToolsDir>$(SolutionDir)\Tools\</ToolsDir> | |
</PropertyGroup> | |
<PropertyGroup> | |
<StyleCopTreatErrorsAsWarnings>false</StyleCopTreatErrorsAsWarnings> | |
<StyleCopAnalysisTarget Condition=" '$(StyleCopAnalysisTarget)' == '' ">$(ToolsDir)StyleCop\Microsoft.SourceAnalysis.targets</StyleCopAnalysisTarget> |
NewerOlder