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
| for number in {1..20} | |
| do | |
| account=comp69052017a2 | |
| account+=$number | |
| az storage account create --name $account --resource-group COMP6905A2Storage --location eastus --sku Standard_LRS --encryption blob | jq ".name" | |
| az storage account keys list --account-name $account --resource-group COMP6905A2Storage | jq '.[].value' | tr -s '\n' ',' | |
| done | |
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
| #Clear-Host | |
| $classlist - ".\class-list.tsv" #contains a tab-delimited list of object ids, resource group names and locations | |
| $tenant = "guid" | |
| $app_id = "guid" | |
| $app_key = ConvertTo-SecureString "key" -AsPlainText -Force | |
| $cred = New-Object -TypeName pscredential -ArgumentList $app_id, $app_key | |
| Login-AzureRmAccount -Credential $cred -ServicePrincipal -TenantId $tenant | |
| Get-Content $classlist | ForEach-Object { | |
| $tokens = $_ -split "\t" |
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
| [FunctionName("GoogleActions")] | |
| public static IActionResult Run( | |
| [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, | |
| [Queue("changevmstate")] out string state, | |
| ILogger log) | |
| { | |
| state = null; | |
| try |
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
| public Tuple<string,string> SetState(string state) | |
| { | |
| var vmName = VirtualMachineName; | |
| var client = AzureClientId; | |
| var key = AzureClientKey; | |
| var tenant = AzureTenantId; | |
| var creds = new AzureCredentialsFactory() | |
| .FromServicePrincipal(client, key, tenant, AzureEnvironment.AzureGlobalCloud); | |
| var subscriptionId = AzureSubscriptionId; | |
| var azure = Microsoft.Azure.Management.Fluent.Azure.Authenticate(creds).WithSubscription(subscriptionId); |
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.ComponentModel.DataAnnotations; | |
| using System.Runtime.Serialization; | |
| using System.Text; | |
| namespace TSharkConsumer | |
| { | |
| [System.Runtime.Serialization.DataContractAttribute(Name = "SMPPMessage", | |
| Namespace = "http://schemas.datacontract.org/2004/07/teleios.messaging.smpp.Models")] |
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.Net; | |
| using System.Net.Sockets; | |
| using System.Threading.Tasks; | |
| namespace ListenOnAny | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) |
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.Linq; | |
| using System.Net.Http; | |
| using System.Text; | |
| using System.Threading.Tasks; | |
| using Microsoft.Azure.WebJobs; | |
| using Microsoft.Azure.WebJobs.Host; | |
| using Microsoft.Extensions.Configuration; | |
| using Microsoft.Extensions.Logging; |
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
| import logging | |
| import gkeepapi | |
| import jsonpickle | |
| import os | |
| import azure.functions as func | |
| class KeepNote(object): | |
| label = "" | |
| text = "" | |
| category = "" |
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 ImageToBase64 { | |
| Param([String]$path) | |
| [bool]$valid = ($path -ne "") | |
| if ($valid) { | |
| [String[]]$elements = $path.split(".") | |
| [int]$max = $elements.Count - 1 | |
| [String]$ext = $elements[$max] | |
| [String]$uri = "data:image/$($ext);base64," | |
| $elements[$max] = "txt" |
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
| /// <summary> | |
| /// Transform NV12 to bmp image so we can view how is it looks like. Note it's not NV12 to RBG conversion. | |
| /// </summary> | |
| /// <param name="data">NV12 sample data.</param> | |
| /// <param name="width">Image width.</param> | |
| /// <param name="height">Image height.</param> | |
| /// <param name="logger">Log instance.</param> | |
| /// <returns>The <see cref="Bitmap"/>.</returns> | |
| public static Bitmap TransformNv12ToBmpFaster(byte[] data, int width, int height, IGraphLogger logger) | |
| { |