Skip to content

Instantly share code, notes, and snippets.


Nick Craver NickCraver

View GitHub Profile
NickCraver / gist:65a497c86a4762f97019
Last active Aug 29, 2015
Initial SQLIO Results from an Intel 800GB P3700
View gist:65a497c86a4762f97019
sqlio v1.5.SG
using system counter for latency timings, 2636721 counts per second
8 threads writing for 120 secs to file E:\TestFile.dat
using 8KB random IOs
enabling multiple I/Os per thread with 8 outstanding
buffering set to use hardware disk cache (but not file cache)
using current size: 24576 MB for file: E:\TestFile.dat
initialization done
throughput metrics:
NickCraver / Notes.txt
Last active Aug 29, 2015
SQLIO Performance tests of a 2 TB Intel P3700 NVMe PCIe SSD on a Dell r710
View Notes.txt
Notes: this is on a Dell R710 server running Windows 2012 Server Core (latest patches as of 2014-10-12) - access to NVMe drives is via a mini driver on this OS version.
We'll re-run these tests when these SSDs migrate to some new R730xd servers in about a month, when we rebuild the cluster on Windows 2012 R2 which has native NVMe support.
This is also in a currently inactive server while we do a burn-in test on the primary to ensure there are no issues with this storage setup. If you have additional SQLIO test configurations you want to see - ping me via @Nick_Craver and I'm happy to run when until we stick this into production on 2014-10-14 (2 days from now).
NickCraver / pre-push
Created Mar 19, 2015
pre-push git hook for CloudFlare purging
View pre-push
sleep 10s && curl \
-d 'a=fpurge_ts' \
-d 'tkn=<insert API token>' \
-d 'email=<insert email>' \
-d 'z=<insert domain>' \
-d 'v=1' &
exit 0
NickCraver / HTTPMuter.cs
Created Mar 27, 2015
A simple HTTPListener to enable muting remotely
View HTTPMuter.cs
using System;
using System.Net;
using System.Runtime.InteropServices;
using System.Text;
class Program
static readonly HttpListener httpListener = new HttpListener();
static void Main(string[] args)
NickCraver / UDFPerf.sql
Last active Aug 29, 2015
UDF Performance and why to avoid use in WHERE clauses
View UDFPerf.sql
-- Here, the function is run once, and using the result for row comparisons
Declare @RayId BIGINT = dbo.fnToRay('1D7370C08D710779-EWR');
Select *
From Log_2015_04_15
Where RayId = @RayId;
-- (1 row(s) affected)
-- Table 'Log_2015_04_15'. Scan count 41, logical reads 7808338, physical reads 0, read-ahead reads 126, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
-- SQL Server Execution Times:
-- CPU time = 24124 ms, elapsed time = 2752 ms.
NickCraver / Startup.cs
Last active Aug 29, 2015
IFTTT WordPress faker for listening to Amazon Echo - Empty OWIN App's Startup.cs
View Startup.cs
using System;
using System.Threading.Tasks;
using System.IO;
using System.Text.RegularExpressions;
using Microsoft.AspNet.Builder;
using Microsoft.AspNet.Http;
using Microsoft.Framework.DependencyInjection;
namespace IFTTTEndpoint
NickCraver / install.log
Created May 5, 2015
npm install -g yo grunt-cli generator-aspnet bower
View install.log
ncraver@CraverBook:~$ sudo npm install -g yo grunt-cli generator-aspnet bower
npm WARN engine yo@1.4.6: wanted: {"node":">=0.10.0","npm":">=2.1.0"} (current: {"node":"v0.10.26","npm":"1.4.3"})
npm http GET
npm http GET
npm http GET
npm http 304
npm http 304
npm http 200
npm http GET
NickCraver / extension.log
Created May 10, 2015
View extension.log
2015-05-09 23:03:22.1357|INFO|thread:32|LoginTabViewModel|Error logging into '' as ''
Microsoft.VisualStudio.Composition.CompositionFailedException: An exception was thrown while initializing part "GitHub.VisualStudio.UI.Views.Controls.TwoFactorControl". ---> System.InvalidOperationException: The calling thread must be STA, because many UI components require this.
at System.Windows.Input.InputManager..ctor()
at System.Windows.Input.InputManager.GetCurrentInputManagerImpl()
at System.Windows.Input.KeyboardNavigation..ctor()
at System.Windows.FrameworkElement.FrameworkServices..ctor()
at System.Windows.FrameworkElement.EnsureFrameworkServices()
at System.Windows.FrameworkElement..ctor()
at System.Windows.Controls.Control..ctor()
at GitHub.UI.SimpleViewUserControl..ctor() in c:\Users\shana\Documents\GitHub\VisualStudio\src\GitHub.UI.Reactive\Controls\SimpleViewUserControl.cs:line 23
NickCraver / haproxy.cfg.example
Created May 20, 2015
HAProxy SSL/TLS Setings for Stack Overflow as of 2015-05-20
View haproxy.cfg.example
tune.ssl.default-dh-param 2048
tune.ssl.maxrecord 1400
NickCraver / NuGet-Unrelated-Source-Fail.log
Created Aug 5, 2015
Log showing NuGet failure when an unrelated source fails to pull, when is fine.
View NuGet-Unrelated-Source-Fail.log
Installing NuGet package Microsoft.Owin.Host.SystemWeb.3.0.1.
Successfully installed 'Microsoft.Owin.Host.SystemWeb.3.0.1' to WebApplication2
========== Finished ==========
PATH=.\node_modules\.bin;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External;%PATH%;C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\Web Tools\External\git
C:\Users\ncraver.STACKEXCHANGE\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5\bin\dnx.exe "C:\Users\ncraver.STACKEXCHANGE\.dnx\runtimes\dnx-clr-win-x86.1.0.0-beta5\bin\lib\Microsoft.Framework.PackageManager\Microsoft.Framework.PackageManager.dll" restore "c:\users\ncraver.stackexchange\documents\visual studio 2015\Projects\WebApplication2\src\WebApplication2" -f "C:\Program Files (x86)\Microsoft Web Tools\DNU"
Microsoft .NET Development Utility CLR-x86-1.0.0-beta5-12103
Restoring packages for c:\users\ncraver.stackexchange\documents\visual studio 2015\Projects\WebApplication2\src\WebApplication2\project.j