View SODailyRep.user.js
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
// ==UserScript== | |
// @name SO Daily Reputation | |
// @namespace soRepDaily | |
// @description Shows reputation for the current day. | |
// @include http://stackoverflow.com/* | |
// @include http://serverfault.com/* | |
// @include http://superuser.com/* | |
// @include http://meta.stackoverflow.com/* | |
// @include http://*.stackexchange.com/* | |
// ==/UserScript== |
View enter-comments.user.js
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
// ==UserScript== | |
// @name Disable Enter key on comments on Stack Exchange. | |
// @namespace http://networkpx.googlecode.com | |
// @description Disable Enter key on comments on Stack Exchange. | |
// @include http://*.stackexchange.com/* | |
// @include http://stackoverflow.com/* | |
// @include http://meta.stackoverflow.com/* | |
// @include http://serverfault.com/* | |
// @include http://meta.serverfault.com/* | |
// @include http://superuser.com/* |
View se-disable-search-animation.user.js
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
// ==UserScript== | |
// @name Stack Exchange search box animation disabler 1.0 | |
// @namespace stackoverflow | |
// @description Removes Stack Exchange search box animation shenanigans | |
// @include http://stackoverflow.com/* | |
// @include http://*.stackoverflow.com/* | |
// @include http://*.stackexchange.com/* | |
// @include http://serverfault.com/* | |
// @include http://superuser.com/* | |
// @include http://stackapps.com/* |
View SQL-Login-Replication.sql
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
SET NOCOUNT ON; | |
DECLARE @name sysname, | |
@PWD_varbinary varbinary (256), | |
@PWD_string varchar (514), | |
@SID_varbinary varbinary (85), | |
@SID_string varchar (514), | |
@sqlString varchar (1024), | |
@is_policy_checked varchar (3), | |
@is_expiration_checked varchar (3), | |
@defaultdb sysname; |
View CurrentQuery
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
Declare @MaxResultCount int = 50; | |
SELECT AvgCPU, AvgDuration, AvgReads, AvgCPUPerMinute, | |
TotalCPU, TotalDuration, TotalReads, | |
PercentCPU, PercentDuration, PercentReads, PercentExecutions, | |
ExecutionCount, | |
ExecutionsPerMinute, | |
PlanCreationTime, LastExecutionTime, | |
SUBSTRING(st.text, | |
(StatementStartOffset / 2) + 1, |
View StringSplits.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
/// <summary> | |
/// Using a single instance of these arrays prevents an allocation of a new array on every call to something like | |
/// string.Split(';') which is really calling string string.Split(params char[] separator), causing an allocation | |
/// of an additional array behind the scenes. | |
/// </summary> | |
/// <remarks> | |
/// For most applications this is a micro-optimization that doesn't matter. However, for very high traffic code paths | |
/// this can generate a significant amount of items that the gen 0 garbage collector needs to collect, causing micro-stalls | |
/// in the app domain when it runs, or runs more often. | |
/// </remarks> |
View gist:65a497c86a4762f97019
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
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: |
View Notes.txt
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
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). |
View pre-push
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
#!/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 |
View HTTPMuter.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
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) |
OlderNewer