View gist:8e9b291ca3259b3ab45cb0d312282996
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
<div class="section-block section-price hidden"> | |
<h3 class="section-block--header tds-text--item_headline">Car Price</h3> | |
<p class="section-block--data tds-text--body">$76,900</p> | |
</div> |
View HTTP3.js
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
fetch('https://example.com/api', { | |
method: 'GET', | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json' | |
}, | |
protocol: 'http3', | |
}) | |
.then(response => { | |
if (!response.ok) { |
View HTTP3.cs
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
public void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddHttpsRedirection(options => | |
{ | |
options.HttpsPort = 443; | |
}); | |
} | |
public void Configure(IApplicationBuilder app, IWebHostEnvironment env) | |
{ |
View captivePortalExample.ino
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 <DNSServer.h> | |
#include <WiFi.h> | |
#include <AsyncTCP.h> | |
#include "ESPAsyncWebServer.h" | |
DNSServer dnsServer; | |
AsyncWebServer server(80); | |
String user_name; | |
String proficiency; |
View TicketReport.ps1
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
# Set the Selection Parameters here!!!! | |
$yearToSelect=2022 | |
# PAT Generation documented here: https://docs.microsoft.com/en-us/azure/devops/organizations/accounts/use-personal-access-tokens-to-authenticate?view=azure-devops&tabs=Windows#create-a-pat | |
# Required Permissions: Analytics (READ):; Work Items (READ) | |
$AzureDevOpsPAT = "PLEASE INSERT PAT" | |
$OrganizationName = "realcoretfs" | |
$AzureDevOpsAuthenicationHeader = @{Authorization = 'Basic ' + [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(":$($AzureDevOpsPAT)")) } | |
$AzureDevOpsAuthenicationHeader |
View City.cs
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 NetTopologySuite.Geometries; | |
using System.ComponentModel.DataAnnotations.Schema; | |
namespace spatial | |
{ | |
[Table("City")] | |
public class City | |
{ | |
public int ID { get; set; } |
View Query Nearest City.cs
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
// Create factory | |
var gf = NetTopologySuite.NtsGeometryServices.Instance.CreateGeometryFactory(4326); | |
// Set our Current Location | |
var currentLocation = gf.CreatePoint(new NetTopologySuite.Geometries.Coordinate(-122.171936, 47.643159)); | |
// Find the nearest city in correlation to our location | |
var nearestCity = ctx.Cities.OrderBy(c => c.Location.Distance(gf.CreateGeometry(currentLocation))); | |
// Print out | |
Console.WriteLine(String.Format("Nearest Citiy is : {0}", nearestCity.ToList().FirstOrDefault().CityName)); |
View demodata.cs
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
// Create first data entry | |
City seattle = new City(); | |
seattle.CityName = "Seattle"; | |
seattle.Location = new Point(-122.333056, 47.609722) { SRID = 4326 }; | |
ctx.Cities.Add(seattle); | |
// Create second data entry | |
City redmond = new City(); | |
redmond.CityName = "Redmond"; | |
redmond.Location = new Point(-122.123889, 47.669444) { SRID = 4326 }; |
View ImportGroupsToAzureAD.ps1
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
foreach ($group in $groups) | |
{ | |
$name = $group.Name | |
$owner = $group.Owner | |
$foundElement = get-azureadgroup -SearchString $name | |
if ($foundElement) | |
{ | |
Write host "$name already exists" | |
} else |
View openNuki.js
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
on('buttons.default.switch.desktop' _=>{ | |
setTimeout(_=>{ | |
setState('nuki.0.1234567890.actions.openAction',true); | |
},5000); // Wait 5 seconds | |
}) |
NewerOlder