Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View NickCraver's full-sized avatar
:shipit:
Shipping

Nick Craver NickCraver

:shipit:
Shipping
View GitHub Profile
@NickCraver
NickCraver / gist:65a497c86a4762f97019
Last active August 29, 2015 14:07
Initial SQLIO Results from an Intel 800GB P3700
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
CUMULATIVE DATA:
throughput metrics:
@NickCraver
NickCraver / Notes.txt
Last active August 29, 2015 14:07
SQLIO Performance tests of a 2 TB Intel P3700 NVMe PCIe SSD on a Dell r710
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
NickCraver / pre-push
Created March 19, 2015 23:20
pre-push git hook for CloudFlare purging
#!/bin/sh
sleep 10s && curl https://www.cloudflare.com/api_json.html \
-d 'a=fpurge_ts' \
-d 'tkn=<insert API token>' \
-d 'email=<insert email>' \
-d 'z=<insert domain>' \
-d 'v=1' &
exit 0
@NickCraver
NickCraver / HTTPMuter.cs
Created March 27, 2015 03:51
A simple HTTPListener to enable muting remotely
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
NickCraver / UDFPerf.sql
Last active August 29, 2015 14:19
UDF Performance and why to avoid use in WHERE clauses
-- 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
NickCraver / install.log
Created May 5, 2015 00:30
npm install -g yo grunt-cli generator-aspnet bower
ncraver@CraverBook:~$ sudo npm install -g yo grunt-cli generator-aspnet bower
Password:
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 https://registry.npmjs.org/resolve
npm http GET https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/findup-sync
npm http 304 https://registry.npmjs.org/resolve
npm http 304 https://registry.npmjs.org/findup-sync
npm http 200 https://registry.npmjs.org/nopt
npm http GET https://registry.npmjs.org/abbrev
@NickCraver
NickCraver / Startup.cs
Last active August 29, 2015 14:20
IFTTT WordPress faker for listening to Amazon Echo - Empty OWIN App's 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
NickCraver / extension.log
Created May 10, 2015 03:04
GitHub.VisualStudio.UI.Views.Controls.TwoFactorControl
2015-05-09 23:03:22.1357|INFO|thread:32|LoginTabViewModel|Error logging into 'https://github.com/' as 'nrcraver@gmail.com'
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
NickCraver / haproxy.cfg.example
Created May 20, 2015 13:52
HAProxy SSL/TLS Setings for Stack Overflow as of 2015-05-20
ssl-default-bind-ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA
tune.ssl.default-dh-param 2048
tune.ssl.maxrecord 1400
@NickCraver
NickCraver / NuGet-Unrelated-Source-Fail.log
Created August 5, 2015 23:54
Log showing NuGet failure when an unrelated source fails to pull, when nuget.org is fine.
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