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
- task: DotNetCoreCLI@2 | |
displayName: 'Install .NET tools from local manifest' | |
inputs: | |
command: custom | |
custom: tool | |
arguments: 'restore' | |
- task: DotNetCoreCLI@2 | |
displayName: 'Run unit tests' | |
inputs: |
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
trigger: | |
- none | |
pool: | |
vmImage: 'windows-latest' | |
jobs: | |
- job: Build | |
steps: | |
- task: DotNetCoreCLI@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
trigger: | |
- none | |
pool: | |
vmImage: 'windows-latest' | |
jobs: | |
- job: Build | |
steps: | |
- task: DotNetCoreCLI@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
#!/bin/bash | |
set -e | |
# Select a default .NET version if one is not specified | |
if [ -z "$DOTNET_VERSION" ]; then | |
DOTNET_VERSION=3.1.300 | |
fi | |
# Install .NET as the sudo (non-root) user | |
sudo -i -u $SUDO_USER bash << EOF |
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
Date|LogLevel|Class|Url|Action|Method|TraceIdentifier|UserIdentity|RequestDuration|Info | |
2020-04-02 15:12:11.5246|INFO|Program|||||||"Starting Program" | |
2020-04-02 15:12:11.7616|INFO|Program|||||||"Current Version: 1.1.1 " | |
2020-04-02 15:31:33.0385|INFO|SomeController|http://localhost/api/users/3|GetUserDetails|GET|0HLUN2A51T7M5:00000002|7||"OnActionExecuting - Entered on the controller " | |
2020-04-02 15:31:33.6408|INFO|SomeController|http://localhost/api/users/3|GetUserDetails|GET|0HLUN2A51T7M5:00000002|7|573|"{""_id"": ""5e9df633a56334748e1fb801"",""guid"": ""a9c7651b-1b4b-4389-8c2c-600c767de1bf"",""isActive"": true,""name"": ""Lynn Hammond"",""gender"": ""female"",""friends"": [{""id"": 0,""name"": ""Briana Garrett""},{""id"": 1,""name"": ""Carey Mcpherson""}]}" | |
2020-04-02 15:31:34.7320|INFO|SomeController|http://localhost/api/users/3/friends|PostUserFriends|POST|0HLUN2A51T7M5:00000004|7||"OnActionExecuting - Entered on the controller " | |
2020-04-02 15:31:34.9779|INFO|SomeController|http://localhost/api/users/3/f |
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
$ledPinNumber = 8 | |
while($true){ | |
Set-GpioPin -Id $ledPinNumber -Value Low | |
Start-Sleep -Seconds 1 | |
Set-GpioPin -Id $ledPinNumber -Value High | |
Start-Sleep -Seconds 1 | |
} |
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
# PowerShell Remoting Over SSH | |
https://github.com/PowerShell/PowerShell-IoT/blob/master/docs/remoting.md | |
(this is required because of the service sshd restart) | |
sudo apt-get purge openssh-server && sudo apt-get install openssh-server | |
sudo nano /etc/ssh/sshd_config | |
Enable password authentication |
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
function Write-Char { | |
param( | |
[ValidateLength(1,1)] | |
[string]$char | |
) | |
##############TEMP################# | |
$alphabet = @{ | |
A = 0x3E, 0x05, 0x3E | |
B = 0x1F, 0x15, 0x0A | |
C = 0x0E, 0x11, 0x11 |
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 Program | |
{ | |
static void Main(string[] args) | |
{ | |
IEnumerable<Xpto> enumerable = new List<Xpto> | |
{ | |
new Xpto(15,"a"), | |
new Xpto(8,"c"), | |
new Xpto(3,"e"), | |
new Xpto(5,"t"), |
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
HubConnection connection = new HubConnectionBuilder() | |
.WithUrl("http://localhost:52846/entryPoint") | |
.WithConsoleLogger() | |
.Build(); | |
connection.StartAsync().GetAwaiter().GetResult(); | |
connection.InvokeAsync("RegisterConnectionOnGroup", "CoolEmployees"); | |
int myNumber = r.Next(0, 1000); // just to ensure that we have different clients | |
connection.On<string>("ClientMethod", data => Console.WriteLine($"I'm CoolEmployee with random number = {myNumber} - GOT THIS: {data}")); | |
while (true) ; |
NewerOlder