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
javascript:void(prompt('Press%20Ctrl+C',decodeURIComponent(window.location.href).replace(/%20/g,'%2520'))) |
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
// https://en.wikipedia.org/wiki/Date_format_by_country | |
// MM/DD/YYYY USA | |
// DD/MM/YYYY Great Britain | |
// DD.MM.YYYY Germany | |
// DD-MM-YYYY Netherlands | |
// YYYY-MM-DD Canada | |
// YYYY/MM/DD South Africa | |
// YYYY.MM.DD Hungary | |
function getDateTimeFormats(/** @type {string | undefined} */ locale) { |
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.Globalization; | |
using System.IO; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Microsoft.AspNet.Identity; | |
using Microsoft.Owin.Security.DataProtection; | |
/// <summary> | |
/// Token provider that uses an IDataProtector to generate encrypted tokens based off of the security stamp |
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.Web.Http; | |
using System.Web.Http.Controllers; | |
using System.Web.Http.ValueProviders; | |
using System.Web.Http.ValueProviders.Providers; | |
using System.Globalization; | |
using System.Net.Http; | |
using System.Web.Http.ModelBinding; |
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
let oldDigest = GlobalServices.rootScope.$digest; | |
GlobalServices.rootScope.$digest = function () { | |
let stack = (<any>Error()).stack; | |
let t = new Date().getTime(); | |
oldDigest.call(this); | |
t = new Date().getTime() - t; | |
if (t > 250) { | |
console.log(`$digest: ${t} ms`) | |
console.log(stack); | |
} |
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
-- for each... | |
DECLARE @ItemId INT | |
DECLARE ItemCursor CURSOR FOR | |
SELECT ItemId | |
FROM Items | |
WHERE ... | |
OPEN ItemCursor | |
WHILE 1 = 1 | |
BEGIN | |
FETCH NEXT FROM ItemCursor INTO @ItemId |
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 class TokenContainer | |
{ | |
public string Access_token { get; set; } | |
} | |
var request = new RestRequest("/core/connect/token", Method.POST); | |
request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); | |
request.AddParameter("grant_type", "client_credentials"); | |
request.AddParameter("client_id", "CLIENT_ID"); | |
request.AddParameter("client_secret", "CLIENT_SECRET"); |
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
// cscript waitUrl.js http://alm-build/TimeTracker/dev/test/favicon.ico | |
var url = WScript.Arguments(0); | |
var status = 0; | |
var WinHttpReq = new ActiveXObject('WinHttp.WinHttpRequest.5.1'); | |
for (var i = 0; i < 30; i++) { | |
WScript.Sleep(1000); | |
WinHttpReq.Open('GET', url, false); | |
WinHttpReq.Send(); | |
status = WinHttpReq.Status; |
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 o.name, i.name, ddius.* FROM sys.dm_db_index_usage_stats ddius | |
JOIN sys.indexes i ON ddius.object_id = i.object_id AND ddius.index_id = i.index_id | |
JOIN sys.objects o ON i.object_id = o.object_id | |
WHERE ddius.database_id = DB_ID() |
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
static toDictionary<TItem>( | |
array: TItem[], | |
getKey: (item: TItem) => number): { [id: number]: TItem }; | |
static toDictionary<TItem, TValue>( | |
array: TItem[], | |
getKey: (item: TItem) => number, | |
getValue: (item: TItem) => TValue): { [id: number]: TValue }; | |
static toDictionary<TItem>( | |
array: TItem[], | |
getKey: (item: TItem) => string): { [id: string]: TItem }; |