h3. Reusing a single HttpClient instance
h4. Can I use a single HttpClient instance to make multiple calls?
h3. Cookie Links (for later digestion)
module.exports = function (context, req) { | |
if (Math.random() > 0.75) { | |
context.log('Azure Function "Fail75" is randomly (25%) returning 200 OK.'); | |
context.res = { | |
body: "Randomly (25%) returning 200 OK." | |
} | |
} | |
else { | |
context.log('Azure Function "Fail75" is randomly (75%) returning 500 as a transient error.'); | |
context.res = { |
GEO IP SERVICES | |
FORMAT: URL - LOWEST ACCESS TIER - NOTES | |
https://ipinfo.io/pricing - 1,000/day free - $50/m for 10,000/day with support | |
https://freegeoip.net/?q=23.196.102.76 - 15,000/hour free - open source https://github.com/fiorix/freegeoip | |
https://www.maxmind.com/en/geoip2-precision-demo - | |
http://geoiplookup.net/ - NO API - interactive only | |
https://www.ultratools.com/tools/ipWhoisLookupResult - NO API - interactive only | |
https://geoiptool.com/en/?ip=23.196.102.76 - NO API - interactive only | |
http://www.hostip.info/index.html - not looking promising - attributed my Boston-area IP as being in LA with Verizon | |
http://ipinfodb.com/ip_location_api.php - free API, but need API key and single IP address to source requests from - also has a commercial DB dowload ("The IPInfoDB.com has a goal of providing high-quality geolocation service to all users for free.") |
#/bin/bash | |
if [ $1 ] | |
then | |
echo "Resources in Azure Resource Group $1" | |
az resource list --query "[?resourceGroup=='$1'].{ name: name, flavor: kind, resourceType: type, region: location }" --output table | |
else | |
echo "usage: $0 [name-of-azure-resource-group]" | |
fi |
from azure import * | |
from azure.servicemanagement import * | |
subscription_id = '<your_subscription_id>' | |
certificate_path = '<path_to_.pem_certificate>' | |
sms = ServiceManagementService(subscription_id, certificate_path) | |
name = 'myvm' |
from azure.servicemanagement import * | |
import platform | |
import os | |
plat = platform.system() | |
print("Platform == " + plat) | |
if plat != 'Windows': | |
certificate_path = './azquota.pem' # other than Windows | |
else: |
$subName = 'my azure subscription name here' | |
$rgName = 'nesql-june24-demo2' | |
$region = "East US" | |
$serverName = 'billwilder911' | |
$myIp = "107.92.120.203" #### CHANGES A LOT! | |
Add-AzureRmAccount # then log in interactively, including with 2FA | |
Select-AzureRmSubscription -SubscriptionName $subName | |
# How many regions am I allowed to deploy SQL to? |
password="SomeTopSecretPassword" | |
email="bill.wilder@example.com" | |
# openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/CN=DevPartners/emailAddress=$email" | |
# generate .pem (full public/private certificate) | |
openssl req -x509 -nodes -days 365 -newkey rsa:1024 -keyout mycert.pem -out mycert.pem -subj "/emailAddress=$email" | |
# generate .pfx (full public/private certificate) from .pem | |
openssl pkcs12 -export -out mycert.pfx -inkey mycert.pem -in mycert.pem -passout pass:$password | |
# generate .cer (public key) from .pem | |
openssl x509 -inform pem -in mycert.pem -outform der -out mycert.cer |
h3. Reusing a single HttpClient instance
h4. Can I use a single HttpClient instance to make multiple calls?
h3. Cookie Links (for later digestion)
(Get-AzureRmSubscription -SubscriptionId (Get-AzureRmContext).Subscription).SubscriptionName |
I hereby claim:
To claim this, I am signing this object: