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
/* | |
This code flashed acros the screen for a momemt in the "Thank You" video Microsoft | |
published to https://mybuild.microsoft.com/ at the conclusion of the Build 2020 conference. | |
What does it return? | |
*/ | |
namespace Snippet | |
{ | |
public class Program | |
{ |
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
jobs: | |
- job: JobOne | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- script: | | |
NOW=$( date '+%F_%H:%M:%S' ) | |
echo "time value:" |
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
jobs: | |
- job: JobOne | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: | |
- bash: | | |
NOW=$( date '+%F_%H:%M:%S' ) | |
echo "##vso[task.setvariable variable=currentTime]$NOW" | |
displayName: Get Date |
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
## KeepAwake.ps1 | |
## Use SendKeys to toggle the Scroll Lock key | |
## | |
## This will keep the PC awake and prevent | |
## it from going to sleep. | |
## | |
## Author: Chris Pietschmann (https://build5nines.com) | |
$timerseconds = 60 * 4 ## Every 4 minutes |
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
# generate custom root CA certificate | |
openssl req -x509 -newkey rsa:4096 -keyout customRootCA.key -out customRootCA.cer -days 365 | |
# generate leaf certificate | |
openssl req -x509 -newkey rsa:4096 -keyout leafCert.key -out leafCert.cer -days 365 -subj “/C=/ST=/L=/O=/CN=” | |
# generate certificate request for the leaf certificate | |
openssl x509 -x509toreq -days 365 -in leafCert.cer -signkey leafCert.key -out leafCert.req | |
# sign the leaf certificate request with custom root CA certificate |
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
# Generate Private Key and Certificate using RSA 256 encryption (4096-bit key) | |
openssl req -x509 -newkey rsa:4096 -keyout privatekey.pem -out certificate.pem -days 365 | |
# Alternatively, setting the "-newkey" parameter to "rsa:2048" will generate a 2048-bit key. | |
# Generate PKCS#12 (P12) file for cert; combines both key and certificate together | |
openssl pkcs12 -export -inkey privatekey.pem -in certificate.pem -out cert.pfx | |
# Generate SHA256 Fingerprint for Certificate and export to a file | |
openssl x509 -noout -fingerprint -sha256 -inform pem -in certificate.pem >> fingerprint.txt |
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
package javaapplication1; | |
import java.io.IOException; | |
import java.net.URI; | |
import java.net.URISyntaxException; | |
import java.util.ArrayList; | |
import java.util.List; | |
// https://hc.apache.org/ | |
import org.apache.http.HttpEntity; |
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
import java.net.URI; | |
import java.util.ArrayList; | |
import java.util.List; | |
// https://hc.apache.org/ | |
import org.apache.http.HttpEntity; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.NameValuePair; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.entity.UrlEncodedFormEntity; |
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
/// License: Public Domain | |
/// Written by: Chris Pietschmann | |
/// http://pietschsoft.com | |
/// http://BuildAzure.com | |
/// http://BuildIoTCore.com | |
/// | |
/// This is the code behind the simple "#IoT police lights" shown | |
/// in the video at the following URL: | |
/// https://twitter.com/BuildIoTCore/status/756542703786229764 | |
/// |