🏳️🌈
This file contains 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
import { CheckerPlugin } from "awesome-typescript-loader"; | |
import * as path from "path"; | |
import * as webpack from "webpack"; | |
module.exports = (env: any) => { | |
const prod = env && env.prod as boolean; | |
console.log(prod ? "Production" : "Dev" + " main build"); | |
const analyse = env && env.analyse as boolean; | |
if (analyse) { console.log("Analysing build"); } | |
const outputDir = "./"; |
This file contains 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
$Solution = "C:\_git\Mercury\Mercury.sln" | |
[switch]$DeleteFromDisk = $true | |
$ErrorActionPreference = "Stop" | |
$solutionDir = Split-Path $Solution | % { (Resolve-Path $_).Path } | |
cd $solutionDir | |
$projects = Select-String -Path $Solution -Pattern 'Project.*"(?<file>.*\.csproj)".*' ` | |
| % { $_.Matches[0].Groups[1].Value } ` |
This file contains 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
param([string]$Config, [string]$Site, [switch]$Child=$false) | |
if(-not $Child){ | |
Write-Host "Starting child process" | |
$exe = "powershell" | |
$args = @("-File `"$($MyInvocation.MyCommand.Definition)`"", "-Config `"$Config`"", "-Site `"$Site`"", "-Child") | |
$args | |
Start-Process $exe -ArgumentList $args -Wait | |
}else{ | |
try{ |
This file contains 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
{ | |
"iisSettings": { | |
"windowsAuthentication": false, | |
"anonymousAuthentication": true, | |
"iisExpress": { | |
"applicationUrl": "http://localhost:43434/", | |
"sslPort": 44301 | |
} | |
}, | |
"profiles": { |
This file contains 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
const Nightmare = require('nightmare') | |
const request = require('request-promise') | |
const fs = require('fs'); | |
const email = "xxxxx"; | |
const encodedPassword = "xxxxx"; | |
const expectedFile = "./expected.json"; | |
const expected = require(expectedFile); | |
const pushoverToken = "xxxxx"; | |
const pushoverUser = "xxxxx"; |
This file contains 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 MongoDB.Bson.Serialization.Attributes; | |
using MongoDB.Driver; | |
using StackExchange.Exceptional.Internal; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
namespace StackExchange.Exceptional.Stores | |
{ |
This file contains 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.Extensions.Logging; | |
using Microsoft.Extensions.Options; | |
using Microsoft.TeamFoundation.SourceControl.WebApi; | |
using Microsoft.TeamFoundation.WorkItemTracking.WebApi; | |
using Microsoft.TeamFoundation.WorkItemTracking.WebApi.Models; | |
using Microsoft.VisualStudio.Services.WebApi; | |
using Microsoft.VisualStudio.Services.WebApi.Patch; | |
using Microsoft.VisualStudio.Services.WebApi.Patch.Json; | |
using Newtonsoft.Json; | |
using System; |
This file contains 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
const fetch = require("node-fetch"); | |
const oauthClientUrl = "https://pastebin.com/raw/pS7Z6yyP" | |
const baseUrl = "https://owner-api.teslamotors.com"; | |
function wait(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
async function getHeaders() { |
This file contains 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
Set-Location $PSScriptRoot | |
if (-not (Get-Module -ListAvailable -Name "Newtonsoft.Json")) { | |
Install-Module "Newtonsoft.Json" -Force | |
} | |
Import-Module "Newtonsoft.Json" | |
. $PSScriptRoot/normalize.ps1 |
This file contains 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
$commaNumberRegex = [regex]'([0-9][0-9\,]+[0-9])' | |
$decimalNumberRegex = [regex]'([0-9]+\.[0-9]+)' | |
$poundsRegex = [regex]'£([0-9\,]*[0-9]+)' | |
$dollarsRegex = [regex]'\$([0-9\.\,]*[0-9]+)' | |
$ordinalRegex = [regex]'([0-9]+)(st|nd|rd|th)' | |
$numberRegex = [regex]'[0-9]+' | |
if (-not (Get-Module -ListAvailable -Name "PSUnidecode")) { | |
Install-Module "PSUnidecode" -Force | |
} |