Live Demo: https://repl.it/J6L1/0
// --------- PARAM ---------
const invocations = _`100_000_000`
const avgRuntimeInSec = 0.5
const avgMemoryInMb = 256
// --------- CALC ---------
' cscript.exe //B //NoLogo pid-cpu.vbs | |
set fs = createObject("Scripting.FileSystemObject") | |
set stdout = fs.getStandardStream(1) | |
' https://msdn.microsoft.com/en-us/library/aa393838(v=vs.85).aspx | |
set refresher = createObject("WbemScripting.SWbemRefresher") | |
set namespace = getObject("winmgmts:root\cimv2") | |
' https://msdn.microsoft.com/en-us/library/aa394323(v=vs.85).aspx | |
set perfdata = refresher.addEnum(namespace, "Win32_PerfFormattedData_PerfProc_Process").objectSet |
'bc'.replace('', 'a') // => 'abc' |
# PowerShell command to build a regex for Dim Files on Github | |
# see: https://github.com/bfred-it/dim-files-on-github | |
# README | |
# | |
# Copy-and-paste the lines below into your PowerShell. | |
# Then hit enter: The built regex will be copied to your | |
# clipboard automatically. | |
'^\.', ` |
$sites = az resource list --resource-type=Microsoft.Web/sites | convertfrom-json | |
$functionapps = $sites | where -property kind -eq functionapp |
Live Demo: https://repl.it/J6L1/0
// --------- PARAM ---------
const invocations = _`100_000_000`
const avgRuntimeInSec = 0.5
const avgMemoryInMb = 256
// --------- CALC ---------
ls -dir | % { | |
cd "$_" | |
write-host "~ $_" -foregroundcolor magenta | |
git pull | |
cd .. | |
} | |
<# | |
PS dir> .\pull-all.ps1 | |
~ subdir1 |
(docker ps -q -a).split('\n') | % { docker rm $_ } | |
(docker images -q -a).split('\n') | % { docker rmi $_ } |
get-dnsclientserveraddress | | |
where { $_.InterfaceAlias -like "*(DockerNAT)" } | % { | |
set-dnsclientserveraddress ` | |
-interfaceindex $_.InterfaceIndex ` | |
-serveraddresses @("8.8.8.8", "8.8.4.4") | |
} |
@echo off | |
powershell -f %~dp0hosts.ps1 %1 %2 %3 |
λ set BITBUCKET_USERNAME=me
λ set BITBUCKET_PASSWORD=secret
λ buildmins org/repo
42