Skip to content

Instantly share code, notes, and snippets.

View brazilnut2000's full-sized avatar

Jon Crowell brazilnut2000

View GitHub Profile
@brazilnut2000
brazilnut2000 / WhatChanged.sql
Last active June 28, 2018 18:07
SQL: What Changed? Get a list of objects sorted by modified date.
/*
* Get a list of objects sorted by modified date.
* Allows you to quickly identify what has been
* added or changed.
*/
SELECT
modify_date, OBJECT_NAME(object_id ) 'Stored Procedure' , *
FROM
sys.procedures
@brazilnut2000
brazilnut2000 / Detect SQL Server Version.sql
Last active June 20, 2019 00:01
SQL: Detect SQL Server Version
SELECT
CASE @@microsoftversion/ 0x01000000
WHEN 6 THEN 'You''ve got to be kidding me.'
WHEN 7 THEN 'SQL Server 7.0'
WHEN 8 THEN 'SQL Server 2000'
WHEN 9 THEN 'SQL Server 2005'
WHEN 10 THEN 'SQL Server 2008'
WHEN 11 THEN 'SQL Server 2012'
WHEN 12 THEN 'Time to update your gist, homey.'
END
@brazilnut2000
brazilnut2000 / Detect IE Version.js
Last active December 15, 2015 12:29 — forked from padolsey/gist:527683
JS: ie version detection
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}