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
| // Fastest install script for npm 7.0+ | |
| // usage: node install | |
| const fs = require('fs'); | |
| const readLockFile = path => { | |
| if (fs.existsSync(path)) { | |
| const text = fs.readFileSync(path, { encoding:'utf8', flag:'r' }); | |
| const lockFile = JSON.parse(text); | |
| delete lockFile.dependencies; |
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
| components: | |
| schemas: | |
| User: | |
| title: User | |
| description: User Model | |
| type: object | |
| properties: | |
| id: | |
| type: integer | |
| firstName: |
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
| function $localize(s: TemplateStringsArray) { | |
| if (s.raw[0][0] === ':') { | |
| const i = s[0].indexOf(':', 1) | |
| if (i > 0) { | |
| return s[0].substring(i + 1); | |
| } | |
| } | |
| return s[0]; | |
| } |
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
| { | |
| "workbench.colorTheme": "Visual Studio Light", | |
| "editor.inlineSuggest.enabled": true, | |
| "editor.fontFamily": "Codescopix, Cascadia Mono2, Consolas, 'Courier New', monospace", | |
| "editor.fontSize": 14, | |
| "editor.formatOnSave": true, | |
| "editor.minimap.enabled": false, | |
| "git.enabled": false, | |
| "workbench.tree.indent": 16, | |
| "workbench.tree.renderIndentGuides": "none", |
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
| using Microsoft.AspNetCore.Hosting; | |
| using Microsoft.AspNetCore.Server.Kestrel.Core; | |
| using System; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Net; | |
| using System.Security.Cryptography.X509Certificates; | |
| namespace Microsoft.Extensions.Hosting | |
| { |
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
| // ==UserScript== | |
| // @include * | |
| // @noframes | |
| // @grant unsafeWindow | |
| // @grant GM_registerMenuCommand | |
| // @grant GM_setClipboard | |
| // ==/UserScript== | |
| GM_registerMenuCommand('Copy URL', () => { |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Xml; | |
| namespace tztest | |
| { | |
| class Program | |
| { | |
| private static XmlDocument LoadCldrXml(string path) |
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
| int 2 147 483 647 (2^32 / 2) - 2 billions | |
| float 16 777 216 (2^24) - 16 millions | |
| double 9 007 199 254 740 992 (2^53) - 9 quadrillions (millions of billions) | |
| long 9 223 372 036 854 775 807 (2^64 / 2) - 9 quintillions (billions of billions) | |
| decimal 79 228162514 264337593 543950335 (2^96) - 79 octillions (billions of billions of billions) | |
| t/sql money 922 337 203 685 477 (2^63 / 1e4) - 900 trillions (millions of millions) | |
| t/sql smallmoney 214 748 (2^31 / 1e4) - 200 thousands | |
| t/sql numeric(38,4) 999999999..99 (1e34 - 1) - 9 decillion (millions of billions of billions of billions) |
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
| public static string ToCamelCase(string text) | |
| { | |
| if (text != null) | |
| { | |
| var upperCount = 0; | |
| while (upperCount < text.Length && char.IsUpper(text, upperCount)) | |
| { | |
| upperCount++; | |
| } | |
| if (upperCount > 1 && upperCount < text.Length && char.IsLower(text, upperCount)) |
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 | |
| sum(ddps.row_count) | |
| FROM sys.indexes AS i | |
| INNER JOIN sys.objects AS o ON i.OBJECT_ID = o.OBJECT_ID | |
| INNER JOIN sys.dm_db_partition_stats AS ddps ON i.OBJECT_ID = ddps.OBJECT_ID | |
| AND i.index_id = ddps.index_id | |
| WHERE i.index_id < 2 AND o.is_ms_shipped = 0 |