Skip to content

Instantly share code, notes, and snippets.

@tylerd
tylerd / dabblet.css
Created December 21, 2011 16:11
My first CSS dabble
/**
* My first CSS dabble
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height:100%;
@tylerd
tylerd / Remove-WorkflowPresentation.ps1
Created March 28, 2012 14:45 — forked from jstangroome/Remove-WorkflowPresentation.ps1
Strip elements and attributes added to a TFS 2010 Build Process Template by the designer for a cleaner change history
#requires -version 2.0
[CmdletBinding()]
param(
[parameter(Mandatory=$true)]
[ValidateScript({ $_ | Test-Path -PathType Leaf })]
[string]
$Path
)
function New-XmlNamespaceManager ($XmlDocument, $DefaultNamespacePrefix) {
@tylerd
tylerd / gist:2331629
Created April 7, 2012 19:46
Table Data Context Using Composition
public class DataContext
{
private TableServiceContext _context;
public DataContext()
{
var account = CloudStorageAccount.FromConfigurationSetting("DataContext");
_context= account.CreateCloudTableClient().GetDataServiceContext();
}
@tylerd
tylerd / gist:2331699
Created April 7, 2012 19:58
Create Tables From Model
var account = CloudStorageAccount.FromConfigurationSetting("DataContext");
CloudTableClient.CreateTablesFromModel(typeof(DataContext),
account.TableEndpoint.AbsoluteUri,
account.Credentials);
@tylerd
tylerd / WorkerRole.cs
Created April 15, 2012 22:45
Azure Logging Part 1: Log file sync
using System;
using System.IO;
using System.Threading;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.Diagnostics;
using Microsoft.WindowsAzure.ServiceRuntime;
using log4net;
using log4net.Config;
namespace WorkerRole
@tylerd
tylerd / 1-Intro.ps1
Last active August 29, 2015 13:56
PowerShell Session for Winnipeg .NET User Group
#Print Strings
"Hello World"
#Run Commands
ping google.com
#Use Variables
Get-AzureRmLog -StartTime 2016-01-05 -EndTime 2016-01-06 `
| select `
Caller,EventTimestamp,ResourceGroupName, `
@{Name="LocalTime";Expression={[System.TimeZone]::CurrentTimeZone.ToLocalTime($_.EventTimestamp)}}, `
OperationName `
| sort EventTimestamp
@tylerd
tylerd / CopyDisk.ps1
Last active May 23, 2017 19:28
AzureUnmanagedDiskScripts
$subscriptionName = "IAAS";
$storageAccountName = "demop2svpndisks";
$storageAccountResourceGroupName = "Demo2";
$containerName = "vhds";
$blobName = "Jumpbox34.vhd";
Login-AzureRmAccount
Select-AzureRmSubscription -SubscriptionName $subscriptionName
@tylerd
tylerd / dev-box.ps1
Last active June 3, 2019 18:08
Boxstarter Script to setup dev box
# Description: Boxstarter Script
# Author: Tyler Doerksen
# Common dev settings for azure dev
Disable-UAC
#--- Windows Features ---
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
# Description: Boxstarter Script
# Author: Tyler Doerksen
# Azure Development Box
Disable-UAC
#--- Windows Features ---
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
#--- File Explorer Settings ---