Skip to content

Instantly share code, notes, and snippets.

💭
Setting my status

Darren Fuller dazfuller

💭
Setting my status
Block or report user

Report or block dazfuller

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@dazfuller
dazfuller / azuredeploy.json
Last active Sep 26, 2019
Azure Data Lake Gen 2 - ARM template
View azuredeploy.json
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "0.0.0.1",
"parameters": {
"resourcePrefix": {
"type": "string",
"minLength": 3,
"maxLength": 10,
"metadata": {
"description": "The prefix to use for resources within the resource group"
@dazfuller
dazfuller / azure_aad_function.py
Last active Aug 17, 2018
Calling an Azure Active Directory (AAD) secured Azure Function from Python
View azure_aad_function.py
import json
import requests
with open('settings.json', 'r') as fp:
settings = json.load(fp)
CLIENT_ID = settings['clientId']
CLIENT_SECRET = settings['clientSecret']
TENANT_ID = settings['tenantId']
APP_ID_URI = settings['appIdUri']
@dazfuller
dazfuller / Program.cs
Last active Feb 9, 2018
Reading Parquet from Azure Blob
View Program.cs
using System;
using Microsoft.WindowsAzure.Storage;
using Microsoft.WindowsAzure.Storage.Auth;
using Parquet;
namespace ParquetFromAzureBlob
{
public static class Program
{
private const string AccountName = "<account name>";
@dazfuller
dazfuller / License.md
Last active Feb 5, 2018
Exporting data from a database to Parquet files in .NET (Core). This demo application targets a SQL Server database but the code could be re-used to target other database solutions.
View License.md

MIT License

Copyright (c) 2018 Darren Fuller

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

@dazfuller
dazfuller / Get-AzureRmVMPrivateIPAddresses.ps1
Created Jun 14, 2017
Find the primary private IP address of VMs in Azure
View Get-AzureRmVMPrivateIPAddresses.ps1
$VMs = Get-AzureRmVM
$Results = @()
ForEach ($VM in $VMs)
{
ForEach ($NicID in $VM.NetworkInterfaceIDs)
{
$Nic = Get-AzureRmResource -ResourceId $NicID | Get-AzureRmNetworkInterface
$Result = New-Object PSObject
$Result | Add-Member -MemberType NoteProperty -Name "ResourceGroupName" -Value $VM.ResourceGroupName
View EnableAuditAndThreatDetection.ps1
<#
.DESCRIPTION
A runbook which will enable security settings for all database servers and databases in a subscription
.NOTES
AUTHOR: @dazfuller
LASTEDIT: Jan 30, 2016
#>
$connectionName = "AzureRunAsConnection"
View Remove-UnusedAzureRMVMs.ps1
<#
.DESCRIPTION
Finds and removes VMs which have not been started within a defined period of time
.NOTES
AUTHOR: @dazfuller
LASTEDIT: Jan 26, 2017
#>
# Define the number of days after which a VM is considered dead
$NumberDays = 7
View EnableTransparentDataEncryption.ps1
<#
.DESCRIPTION
Enables Transparent Data Encryption on all Azure SQL Databases within a subscription
.NOTES
AUTHOR: @dazfuller
LASTEDIT: Jan 12, 2017
#>
$connectionName = "AzureRunAsConnection"
View EnableStorageAccountEncryption.ps1
<#
.DESCRIPTION
A runbook which finds storage accounts without encryption services enabled and
enables them
.NOTES
AUTHOR: @dazfuller
LASTEDIT: Jan 11, 2017
#>
workflow EnableStorageAccountEncryption
View DisableRDPAccess.ps1
<#
.DESCRIPTION
A runbook which finds unrestricted inbound RDP rules on the standard RDP port and
changes their action to Deny
.NOTES
AUTHOR: @dazfuller
LASTEDIT: Jan 10, 2017
#>
workflow DisableRDPRules
You can’t perform that action at this time.