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
#!/usr/bin/env python3 | |
from smbus2 import SMBus | |
def scan(force=False): | |
devices = [] | |
for addr in range(0x03, 0x77 + 1): | |
read = SMBus.read_byte, (addr,), {'force':force} | |
write = SMBus.write_byte, (addr, 0), {'force':force} |
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( | |
[Parameter(mandatory=$true)] | |
[string]$packagesDirectory | |
) | |
$compressDirectory = | |
{ | |
param($directoryPath, $destinationPath) | |
Compress-Archive -path "$directoryPath\*" -DestinationPath $destinationPath -Force | |
} |
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
##----------------------------------------------------------------------- | |
## <copyright file="ApplyVersionToAssemblies.ps1">(c) Microsoft Corporation. | |
## This source is subject to the Microsoft Permissive License. | |
## See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx. | |
## All other rights reserved.</copyright> | |
##----------------------------------------------------------------------- | |
# Look for a 0.0.0.0 pattern in the build number. | |
# If found use it to version the assemblies. | |
# | |
# For example, if the 'Build number format' build process parameter |
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( | |
[Parameter(mandatory=$true)] | |
[string]$packagesDirectory | |
) | |
$expandZipFile = | |
{ | |
param($zipFile, $zipDestinationPath) | |
Expand-Archive -path "$zipFile" -DestinationPath $zipDestinationPath -Force | |
} |
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 | |
( | |
[ValidateSet("nuget","npm")][string] $feedType = "nuget", | |
[string] $feedName="", | |
[string] $packageId="", | |
[string] $packageVersion=[regex]::matches($Env:BUILD_BUILDNUMBER, “\d+\.\d+\.\d+\.\d+”), | |
[string] $packageQuality="", | |
[switch] $pester | |
) |
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
#include <ESP8266WiFi.h> | |
#include <ESP8266mDNS.h> | |
#include <ArduinoOTA.h> | |
#include <FS.h> | |
#include <ESPAsyncTCP.h> | |
#include <ESPAsyncWebServer.h> | |
#include "SPI.h" | |
#include "SD.h" |
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
class FooEnvironmentBuilder : EnvironmentBuilder | |
{ | |
readonly HostConfigurator _configurator; | |
WindowsHostEnvironment _windowHostEnvironment; | |
public FooEnvironmentBuilder(HostConfigurator configurator) | |
{ | |
_configurator = configurator; | |
_windowHostEnvironment = new WindowsHostEnvironment(_configurator); | |
} |
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.ServiceModel.Channels; | |
using System.ServiceModel.Description; | |
using System.Xml; | |
namespace DokZastrzezoneV4 | |
{ | |
public class CustomTextMessageBindingElement : MessageEncodingBindingElement, IWsdlExportExtension | |
{ | |
private MessageVersion _msgVersion; |
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.ServiceModel.Channels; | |
using System.Xml; | |
namespace DokZastrzezoneV3 | |
{ | |
public class CustomTextMessageBindingElement : MessageEncodingBindingElement | |
{ | |
private MessageVersion _msgVersion; | |
private string _mediaType; |
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
internal static class MyRfc6238AuthenticationService | |
{ | |
private static readonly DateTime UnixEpoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc); | |
private static readonly TimeSpan DefaultTimeStep = TimeSpan.FromMinutes(3); | |
private static readonly Encoding Encoding = new UTF8Encoding(false, true); | |
private static int ComputeTotp(HashAlgorithm hashAlgorithm, ulong timestepNumber, string modifier) | |
{ | |
// # of 0's = length of pin | |
const int mod = 1000000; |