Skip to content

Instantly share code, notes, and snippets.

View dontpaniclabsgists's full-sized avatar

Don't Panic Labs dontpaniclabsgists

View GitHub Profile
new FeedOptions()
{
EnableCrossPartitionQuery = true
}
public async Task<Note[]> AllInPartition(string customerId)
{
using (var client = new DocumentClient(new Uri(_endpoint), _key))
{
var link = UriFactory.CreateDocumentCollectionUri(_databaseId, CollectionId);
var query = client.CreateDocumentQuery<Note>(
link,
new FeedOptions()
{
<svg xmlns="http://www.w3.org/2000/svg" width="900" height="280" viewBox="0 0 2100 633">
<g id="group" fill="none" fill-rule="evenodd">
<rect width="2100" height="650" fill="#262626"/>
<circle cx="676.7672874773058" cy="597.1612764655976" r="3.0788920676038387" fill="#FFFFFF" fill-opacity="0.4443456812210784"></circle>
</g>
</svg>
var stars = 600;sk
var sizeVariance = .9; var starSize = 2.5;
var opacityVariance = 1; var w = 2100;
var h = 650;
var g = document.getElementById("group");
for (var i = 0 ; i < stars ; i++){
var x = getRandomNumber(0,w);
var y = getRandomNumber(0,h);
@dontpaniclabsgists
dontpaniclabsgists / azure_functions_1_3.txt
Created September 18, 2017 16:38
azure_functions_1_3
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Hello bob</string>
[assembly: InternalsVisibleTo("Namespace.To.UnitTestProject")]
[TestMethod]
public void DoSomething1_Test()
{
var data = new byte[1];
var sut = new ReportingService();
var po = new PrivateObject(sut);
var result = po.Invoke("DoSomething1", new object[] { data });
Assert.AreEqual(1, data[0]);
private void DoSomething1(byte[] data)
{
data[0] = 1;
}
@dontpaniclabsgists
dontpaniclabsgists / azure_functions_2b.txt
Created October 3, 2017 17:53
azure_functions_2b.txt
<string xmlns="http://schemas.microsoft.com/2003/10/Serialization/">Bye bob</string>
@dontpaniclabsgists
dontpaniclabsgists / azure_container_registry_1.txt
Last active October 9, 2017 15:48
azure_container_registry_1
az ad sp create-for-rbac --scopes /subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/myresourcegroup/providers/Microsoft.ContainerRegistry/registries/myregistry1 --role Owner --password myPassword