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
ConfigurationMode | |
ConfigurationMode defines how the DSC client operates. Â There are three valid values: | |
Apply | |
ApplyAndMonitor | |
ApplyAndAutoCorrect | |
(NOTE: Â These descriptions of functionality are based on limited testing – the TechNet documentation is not up to date yet, but should be in the near future.) | |
Apply will apply the configuration once and after a successful run is logged, it will stop attempting to apply configuration or checking the configuration. Â ApplyAndMonitor will apply a configuration as in Apply, but will continue to validate that a node is configured as described. Â No corrective action will take place if there is configuration drift. Â Finally, ApplyAndAutoCorrect is what most of us think of when looking at DSC as a configuration management tool. Â This setting applies a configuration and checks it regularly. Â If configuration drift is detected, the configuration manager will attempt to return the machine to the desired state (see how I worked the product name in there..). |
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
SetScript = { | |
$rules = 'File and Printer Sharing (Echo Request - ICMPv6-In)', | |
'File and Printer Sharing (Echo Request - ICMPv4-In)' | |
$rules.ForEach({ | |
$netsh = "netsh.exe --% advfirewall firewall set rule name=`"$_`" new enable=YES" | |
invoke-expression -Command ($netsh) | |
}) | |
} |
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
PS> Get-Net6to4Configuration | |
Description : 6to4 Configuration | |
State : Disabled | |
AutoSharing : Default | |
RelayName : 6to4.ipv6.microsoft.com. | |
RelayState : Default | |
ResolutionIntervalSeconds : 1440 |
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
/** | |
* Converts an HSL color value to RGB. Conversion formula | |
* adapted from http://en.wikipedia.org/wiki/HSL_color_space. | |
* Assumes h, s, and l are contained in the set [0, 1] and | |
* returns r, g, and b in the set [0, 255]. | |
* | |
* @param Number h The hue | |
* @param Number s The saturation | |
* @param Number l The lightness | |
* @return Array The RGB representation |
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
while true | |
do | |
if [ $(openssl s_client -showcerts -connect $1:443 -servername $1 2>&1 < /dev/null | grep "BEGIN CERTIFICATE" | wc -l) != 2 ] | |
then echo "!!!INTERMEDIATE NOT SERVED!!! OpenSSL exit code = $?" | |
fi | |
sleep 1 | |
done |
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
// https://github.com/projectkudu/KuduSync.NET/blob/5ff87c07d69ed7ce250267d4657c262c89dd547b/KuduSync.NET/FileSystemHelpers.cs#L80 | |
using System; | |
using System.IO; | |
namespace ConsoleApplication | |
{ | |
public class Program | |
{ | |
public static void Main(string[] args) |
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
a = true; | |
var timer = setInterval(function() { | |
console.log('loop..'); | |
if (a == false) { | |
console.log('break'); | |
clearInterval(timer); | |
} | |
}, 3000); |
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 System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Drawing; | |
using ImageProcessor; | |
using ImageProcessor.Imaging.Formats; |
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 System.Linq; | |
// | |
string.Concat(Enumerable.Repeat("fa la la la la", 2)); |
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
{ | |
"bindings": [ | |
{ | |
"authLevel": "anonymous", | |
"name": "req", | |
"type": "httpTrigger", | |
"direction": "in" | |
}, | |
{ | |
"name": "$return", |
OlderNewer