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 System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Dapper; | |
using VMware.Data.SQLFire; | |
namespace sqlfire._112 |
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 IpRestrict.App_Start; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Web.Mvc; | |
using System.Web.Optimization; | |
using System.Web.Routing; | |
namespace IpRestrict |
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
class FileCacher | |
{ | |
public Dictionary<string, byte[]> GetXmlFilesAsCache(IEnumerable<string> xmlFiles) | |
{ | |
var cache = new Dictionary<string, byte[]>(); | |
foreach (var file in xmlFiles) | |
{ | |
cache.Add(file, GetBytes(file)); | |
} |
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
// generic use of SDK | |
var account = new CloudStorageAccount(credentials, true); | |
var client = new CloudBlobClient(account.BlobEndpoint.AbsoluteUri, account.Credentials); | |
var container = client.GetContainerReference("test"); | |
var blob = container.GetBlobReference("CloudBlob.txt"); | |
using (var stream = blob.OpenRead()) | |
{ | |
using (var reader = new StreamReader(stream)) | |
{ |
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
import os | |
from delete_datadisk import delete_data_disk | |
def main(): | |
os.environ['AZURE_SUBSCRIPTION_ID'] = "" | |
os.environ['AZURE_CLIENT_ID'] = "" | |
os.environ['AZURE_CLIENT_SECRET'] = "" | |
os.environ['AZURE_TENANT_ID'] = "" | |
resource_group = 'managed-disks' |
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
import os | |
from azure.common.credentials import ServicePrincipalCredentials | |
from azure.mgmt.network import NetworkManagementClient | |
subscription_id = os.environ.get( | |
'AZURE_SUBSCRIPTION_ID', | |
'11111111-1111-1111-1111-111111111111') # your Azure Subscription Id | |
credentials = ServicePrincipalCredentials( | |
client_id=os.environ['AZURE_CLIENT_ID'], |
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
function New-ProvisionVirtualMachineCommand() { | |
$command = (New-Object -TypeName PSObject -Prop (@{ | |
Name = $null; | |
Size = $null; | |
DnsLabel = $null; | |
Location = $null; | |
Credentials = $null | |
ResourceGroup = @{ Name = $null; Location = $null }; | |
VirtualNetwork = @{ Name = $null; ResourceGroupName = $null; Location = $null; SubnetName = $null; }; | |
OS = @{ Windows = $true; Linux = $false }; |
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 class AzureSettings | |
{ | |
public IAzure Azure { get; set; } | |
} |
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
import os | |
from azure.common.credentials import ServicePrincipalCredentials | |
from azure.mgmt.containerinstance import ContainerInstanceManagementClient | |
subscription_id = os.environ.get( | |
'AZURE_SUBSCRIPTION_ID', | |
'11111111-1111-1111-1111-111111111111') # your Azure Subscription Id | |
credentials = ServicePrincipalCredentials( | |
client_id=os.environ['AZURE_CLIENT_ID'], |
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
import os | |
from azure.common.credentials import ServicePrincipalCredentials | |
from azure.mgmt.containerinstance import ContainerInstanceManagementClient | |
from azure.mgmt.containerinstance.models import ContainerGroup | |
from azure.mgmt.containerinstance.models import IpAddress | |
subscription_id = os.environ.get( | |
'AZURE_SUBSCRIPTION_ID', | |
'11111111-1111-1111-1111-111111111111') # your Azure Subscription Id |
OlderNewer