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
iconv -f utf-16 -t utf-8 sqlerrors.log > sqlerrors-utf8.log |
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
// <configuration> | |
// <system.net> | |
// <webRequestModules> | |
// <add prefix="http" | |
// type="UserAgentRequestCreator, namespace, Version=1.0.0.0, | |
// Culture=neutral, PublicKeyToken=9999999999999999" | |
// /> | |
// </webRequestModules> | |
// </system.net> | |
// </configuration> |
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
Path.GetFullPath(new Uri(Path.Combine(Environment.CurrentDirectory, @"..\..\")).LocalPath); |
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
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" |
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 @count = SUM(p.rows) | |
FROM sys.partitions AS p | |
INNER JOIN sys.tables AS t | |
ON p.[object_id] = t.[object_id] | |
INNER JOIN sys.schemas AS s | |
ON t.[schema_id] = s.[schema_id] | |
WHERE p.index_id IN (0,1) -- heap or clustered index | |
AND t.name = N'tablename' | |
AND s.name = N'dbo'; |
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 Disable-IEESC | |
{ | |
$AdminKey = “HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A7-37EF-4b3f-8CFC-4F3A74704073}” | |
Set-ItemProperty -Path $AdminKey -Name “IsInstalled” -Value 0 | |
$UserKey = “HKLM:\SOFTWARE\Microsoft\Active Setup\Installed Components\{A509B1A8-37EF-4b3f-8CFC-4F3A74704073}” | |
Set-ItemProperty -Path $UserKey -Name “IsInstalled” -Value 0 | |
Stop-Process -Name Explorer | |
Write-Host “IE Enhanced Security Configuration (ESC) has been disabled.” -ForegroundColor Green | |
} | |
Disable-IEESC |
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 IEnumerable<TAggregate> InParallel<TSource, TAggregate>( | |
this IEnumerable<TSource> source, | |
Func<TSource, Task<IEnumerable<TAggregate>>> parallelTask) => | |
InParallel(source, parallelTask, k => k); | |
public static IEnumerable<TAggregate> InParallel<TSource, TAggregate, TKey>( | |
this IEnumerable<TSource> source, | |
Func<TSource, Task<IEnumerable<TAggregate>>> parallelTask, | |
Func<TSource,TKey> keySelector) |
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
{ | |
"Version": "2012-10-17", | |
"Statement": [ | |
{ | |
"Sid": "AllowViewAccountInfo", | |
"Effect": "Allow", | |
"Action": [ | |
"iam:ListVirtualMFADevices", | |
"iam:GetAccountPasswordPolicy" | |
], |
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
showCurrency(value: number, precision: number, seperator: string, decimalSeperator: string): string { | |
const stringValue = `${value || 0}` | |
const parts = stringValue.split('.') | |
let numeric = `${parts[0]}` | |
if (seperator) numeric = numeric.replace(/(\d)(?=(\d{3})+(?!\d))/g, `$1${seperator}`) | |
let decimal = `${parts[1] || 0}` | |
if (precision > 0) decimal = decimal.padEnd(precision, '0') | |
decimalSeperator = decimalSeperator || '.' | |
return `${numeric}${decimalSeperator}${decimal}` | |
} |
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
interface Declaration { | |
transforms: { [key: string]: (ctx: any) => void } | |
asyncs: { [key: string]: (ctx: any) => Promise<void> } | |
middlewares: { (ctx: any): void }[] | |
context: { [key: string]: (config: any) => ((state: any) => any) } | |
state: any | |
} | |
export default <Declaration>{ | |
transforms: { |