This file contains hidden or 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
// NOTE: This removes zero's | |
var array = [1, 2, null, 3, undefined, 0, 4, false, 5]; | |
var arrayWithoutFalseys = array.filter(obj => obj); | |
console.log(arrayWithoutFalseys); // [1,2,3,4,5] |
This file contains hidden or 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
{ | |
"editor.fontFamily": "Dank Mono, Menlo, Monaco, 'Courier New', monospace", | |
"editor.fontSize": 19, | |
"editor.lineHeight": 25, | |
"editor.letterSpacing": 0.5, | |
"editor.fontLigatures": true, | |
"editor.autoIndent": true, | |
"files.trimTrailingWhitespace": true, | |
"editor.fontWeight": "400", | |
"prettier.eslintIntegration": true, |
This file contains hidden or 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
Show hidden characters
{ | |
"env": { | |
"browser": true, | |
"commonjs": true, | |
"es6": true | |
}, | |
"extends": ["plugin:react/recommended"], | |
"parserOptions": { | |
"ecmaFeatures": { | |
"jsx": true |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am dougajmcdonald on github. | |
* I am dougmcdonald (https://keybase.io/dougmcdonald) on keybase. | |
* I have a public key ASDCclrM3mkBSsniUp2fRBIDdsQJ_HPJyo7L1R277FS18wo | |
To claim this, I am signing this object: |
This file contains hidden or 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
--Get the DB ID | |
DECLARE @lpDataBaseID int; | |
SET @lpDataBaseID = DB_ID(N'MYDBNAME'); | |
--REBUILD ANY INDEXES > 25% FRAGMENTED | |
DECLARE @opRebuildCommand VARCHAR(MAX) | |
DECLARE opCursor CURSOR LOCAL FAST_FORWARD FOR | |
SELECT |
This file contains hidden or 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
SELECT 'Index Name' = i.name, 'Statistics Date' = STATS_DATE(i.object_id, i.index_id) | |
FROM sys.objects o | |
JOIN sys.indexes i ON o.name in | |
( | |
SELECT | |
name | |
--* | |
FROM |
This file contains hidden or 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
---------------------------------------------------------------- | |
-- Author: Doug McDonald | |
-- Date: 2011-11-21 | |
-- Purpose: Scans a server for the 20 most costly missing indexes | |
-- according to the stats. | |
---------------------------------------------------------------- | |
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED | |
SELECT | |
TOP 20 |
This file contains hidden or 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
SELECT | |
t.NAME AS TableName, | |
p.rows AS RowCounts, | |
SUM(a.total_pages) * 8 AS TotalSpaceKB, | |
SUM(a.used_pages) * 8 AS UsedSpaceKB, | |
(SUM(a.total_pages) - SUM(a.used_pages)) * 8 AS UnusedSpaceKB | |
FROM | |
sys.tables t | |
INNER JOIN | |
sys.indexes i ON t.OBJECT_ID = i.object_id |