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 page = require('webpage').create(), | |
system = require('system'), | |
t, address; | |
if (system.args.length === 1) { | |
console.log('Usage: loadspeedv2.js <some URL>'); | |
phantom.exit(1); | |
} else { | |
t = Date.now(); | |
address = system.args[1]; |
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 Ideafixxxer.Generics; | |
using System; | |
using System.Diagnostics; | |
using System.Text; | |
namespace EnumBenchmarks | |
{ | |
public enum MyEnum | |
{ | |
Undefined = 0, |
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 Owin; | |
using System.Web.Http; | |
using System.Web.Http.Batch; | |
namespace BatchRequestDemo | |
{ | |
public class Startup | |
{ | |
// This code configures Web API. The Startup class is specified as a type | |
// parameter in the WebApp.Start method. |
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.Linq; | |
namespace MyNamespace | |
{ | |
public static class PerfStatsExtensions | |
{ | |
public static double? Avg(this double[] values) | |
{ | |
if (values == null) return null; |
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
Write-Host "Deleting bin, obj, packages,TestResults folders ..." -nonewline | |
Get-ChildItem -inc bin,obj,TestResults,packages -rec | Remove-Item -rec -force | |
Write-Host "Done" -ForegroundColor Yellow |
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
[].forEach.call(document.querySelectorAll('a'), function(a) { | |
var href = a.getAttribute('href'); | |
if(href && href.indexOf('http:')>-1) | |
console.log(href); | |
}); |
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
for %%f in (*.jpg) do jpegtran -copy none -optimize %%f %%~nf.jpg |
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 StructureMap; | |
using System; | |
using System.ServiceModel; | |
namespace MyWcfService.Classes | |
{ | |
public class CustomServiceHost : ServiceHost | |
{ | |
public CustomServiceHost(IContainer container, Type serviceType, params Uri[] baseAddresses) | |
: base(serviceType, baseAddresses) |
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.Diagnostics; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace RegexOptims | |
{ | |
public static class RegexComparer | |
{ | |
private const string REGEX_PATTERN = @"^[\w\d]+$"; |
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.Linq; | |
namespace MyFunnyProject | |
{ | |
internal static class EnumHelper | |
{ | |
public static class EnumCache<TEnum> | |
{ | |
public readonly static TEnum[] Values = null; |
OlderNewer