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
# Ultimately we obviously increase the numbers to e.g. 6 months | |
locals { | |
plantimestamp = plantimestamp() | |
secs = format("%02d", floor(tonumber(formatdate("ss", local.plantimestamp)) / 10) * 10) | |
rounded = "${formatdate("YYYY-MM-DD", local.plantimestamp)}T${formatdate("hh:mm", local.plantimestamp)}:${local.secs}Z" | |
diff = timecmp(local.value2, local.plantimestamp) | |
s1 = local.rounded | |
value2 = timeadd(local.rounded, "5s") | |
s2 = local.diff == 1 ? timeadd(local.rounded, "-5s") : local.value2 |
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
# You can run this script like so: | |
# . .\vwan-topology-export.ps1 -VirtualWanName vwan-platform-prd-weu-001 | select -Property Component, Name, Cidr, Parent, ParentType | ConvertTo-Csv | Set-Content output.csv | |
param( | |
[Parameter(Mandatory=$true)] | |
$VirtualWanName | |
) | |
$vwan = Get-AzVirtualWan -Name $VirtualWanName | |
$vwanresource = Get-AzResource -ResourceId $vwan.id |
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
@ECHO OFF | |
REM Uses the file name as the profile name | |
SET MSTEAMS_PROFILE=%~n0 | |
ECHO - Using profile "%MSTEAMS_PROFILE%" | |
SET "OLD_USERPROFILE=%USERPROFILE%" | |
SET "USERPROFILE=%LOCALAPPDATA%\Microsoft\Teams\CustomProfiles\%MSTEAMS_PROFILE%" | |
ECHO - Launching MS Teams with profile %MSTEAMS_PROFILE% | |
cd "%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams" | |
"%OLD_USERPROFILE%\AppData\Local\Microsoft\Teams\Update.exe" --processStart "Teams.exe" |
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
*** Settings *** | |
Documentation A test suite with a single test for valid login. | |
... | |
... This test has a workflow that is created using keywords in | |
... the imported resource file. | |
Resource resource.txt | |
*** Test Cases *** | |
Valid Login | |
Open Browser To Login Page |
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 test; | |
class Happy { | |
void MyFunction(int i) { | |
test.Method(i); | |
} | |
} |
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
// http://stackoverflow.com/questions/1284423/read-entire-file-in-scala | |
//val source = scala.io.Source.fromFile("G:\\test\\2015-12 Logging Eventhub\\W3SVC916189047\\u_ex151130.log") | |
val source = scala.io.Source.fromFile("testlog.log") | |
val lines = source.getLines() | |
//getLogItems(lines).take(5).foreach { line => println(line) } | |
getLogItems(lines).foreach { line => println(line) } | |
class LogItemsIterator(lines : Iterator[String]) extends Iterator[collection.mutable.Map[String, String]] { | |
var _nextLine = None : Option[collection.mutable.Map[String, String]]; |
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
# http://blogs.technet.com/b/heyscriptingguy/archive/2013/04/26/use-powershell-to-work-with-windows-explorer.aspx | |
$o = New-Object -com Shell.Application | |
$folder = $o.NameSpace(0x11) | |
# https://msdn.microsoft.com/en-us/library/windows/desktop/bb774096(v=vs.85).aspx | |
# ShellSpecialFolderConstants.ssfDRIVES == 0x11 | |
$items = $folder.Items() | |
for ($i= 0; $i -lt $items.Count; $i++) { | |
write-output ([string]$i + ": " + $items.Item($i).Name) |
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
<script type="text/javascript"> | |
(function(){ | |
// Content Editor / Script Editor include in order to extend the SharePoint 2013 content by search and search results webparts with a new token for filtering on followed sites by the active user | |
// (c) 2015 Carl in 't Veld | |
// dependencies: jQuery | |
// This script works by introducing two extensions on top existing SharePoint OOTB functions: | |
// 1. SP.ClientRuntimeContext | |
// Extending the function executeQueryAsync, we create a stack in the ClientRuntimeContext instance |