This file contains hidden or 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 program is designed to create | |
and animate a simple loading animation. | |
""" | |
from sys import stdout as terminal | |
from time import sleep | |
from itertools import cycle | |
from threading import Thread | |
from contextlib import contextmanager |
This file contains hidden or 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
locals { | |
users_object_ids = { | |
"user1": { object_id: "d6c7ce3e-9f1d-4310-8862-8ab64e872246" }, | |
"user2": { object_id: "035c4713-14c0-43c3-a8b0-d4f21bc8ffca" }, | |
} | |
} | |
# | |
# terraform console | |
# > values(local.users_object_ids)[*].object_id |
This file contains hidden or 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 Configuration { | |
[string] $Name | |
[string[]] $DependsOnNames | |
} | |
$Configurations = @{ | |
} | |
$Configurations += @{ | |
configuration1 = [Configuration]@{ |
This file contains hidden or 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 Get-HashtablePartOne { | |
return @{ | |
"a" = "a_value" | |
"c" = "c_value" | |
} | |
} | |
function Get-HashtablePartTwo { | |
return @{ | |
"b" = "b_value" |
This file contains hidden or 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
$PSVersionTable | |
$TEST_JSON = '{ | |
"foo": {"$ref": "#/bar"}, | |
"bar": true | |
}' | |
$testObject = $TEST_JSON | ConvertFrom-Json - | |
$testObject | Format-List |
This file contains hidden or 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.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using System.Xml.XPath; | |
using System.Xml.Xsl; | |
namespace ApplyXSLTToXML |
This file contains hidden or 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
# REST API documentation https://msdn.microsoft.com/en-us/library/azure/dn790664.aspx | |
curl -H 'Authorization: SharedAccessSignature sr={Service Bus Namespace}.servicebus.windows.net&sig={Url Encoded Shared Access Key}&se={Time Stamp with Shared Access Key expration}&skn={Shared Access Policy name}' -H 'Content-Type:application/atom+xml;type=entry;charset=utf-8' --data '{Event Data}' https://{Service Bus Namespace}.servicebus.windows.net/{Event Hub Name}/messages |
This file contains hidden or 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
pn_messenger_t *m_messenger = pn_messenger(NULL); | |
// ... | |
// About addresses and filters for Azure Event Hubs: | |
// https://amqpnetlite.codeplex.com/wikipage?title=Using%20Amqp.Net%20Lite%20with%20Azure%20Server%20Bus%20Event%20Hub&referringTitle=Documentation | |
char address[] = "amqps://user:password@host:port/path"; | |
char filter_section[] = "apache.org:selector-filter:string"; | |
// timestamp in milliseconds | |
char filter_value[] = "amqp.annotation.x-opt-enqueuedtimeutc >= '1422627183000'"; |