Skip to content

Instantly share code, notes, and snippets.

Tatham Oddie tathamoddie

Block or report user

Report or block tathamoddie

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
tathamoddie / consent-self-test.ps1
Created Jan 29, 2018
AAD app consent self-test
View consent-self-test.ps1
tathamoddie / configuration.xml
Created Mar 22, 2017
Office Deployment Tool channel configuration
View configuration.xml
<!-- Office 365 client configuration file sample. To be used for Office 365 ProPlus 2016 apps,
Office 365 Business 2016 apps, Project Pro for Office 365 and Visio Pro for Office 365.
For detailed information regarding configuration options visit:
To use the configuration file be sure to remove the comments
For Office 365 client apps (verion 2013) you will need to use the 2013 version of the
Office Deployment Tool which can be downloaded from
The following sample allows you to download and install Office 365 ProPlus 2016 apps
tathamoddie / Migrate-ActiveAcpUsers.ps1
Created Oct 3, 2016
Skype for Business: migrate only active ACP users to the Microsoft Bridge
View Migrate-ActiveAcpUsers.ps1
[int]$BatchSize = 200
Import-Module 'C:\Program Files\Common Files\Skype for Business Online\Modules\SkypeOnlineConnector'
$skypeSession = New-CsOnlineSession -Credential $cred
tathamoddie / Setup-RoomLists.ps1
Created Jul 22, 2015
Setup room lists in Exchange Online
View Setup-RoomLists.ps1
$cred = Get-Credential
$Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri -Credential $cred -Authentication Basic -AllowRedirection
Import-PSSession $Session
New-DistributionGroup -Name "Melbourne" –RoomList -PrimarySmtpAddress
Add-DistributionGroupMember -Identity "Melbourne" -Member
Add-DistributionGroupMember -Identity "Melbourne" -Member
Add-DistributionGroupMember -Identity "Melbourne" -Member
Add-DistributionGroupMember -Identity "Melbourne" -Member
Add-DistributionGroupMember -Identity "Melbourne" -Member
tathamoddie / gist:b35a8f43e81a1cfd2383
Created Jun 19, 2014
View gist:b35a8f43e81a1cfd2383
<script src="~/Scripts/moment.min.js"></script>
(function() {
var clientNow = moment();
var serverNow = moment('@(DateTimeOffset.UtcNow.ToString("o"))');
var diff = clientNow.diff(serverNow);
if (!!window.performance && !!window.performance.timing) {
var responseStartToNow = new Date().valueOf() - window.performance.timing.responseStart;
diff -= responseStartToNow;
tathamoddie / gist:9927848
Created Apr 2, 2014
Workaround visual bug with Windows Phone when you change themes, and then fast app switch back
View gist:9927848
void WorkaroundThemeResumeBugInWindowsPhone()
var backgroundColor = (Color)Application.Resources["PhoneBackgroundColor"];
var chromeColor = (Color)Application.Resources["PhoneChromeColor"];
var foregroundColor = (Color)Application.Resources["PhoneForegroundColor"];
RootFrame.Navigated += (sender, args) =>
SystemTray.BackgroundColor = backgroundColor;
SystemTray.ForegroundColor = foregroundColor;
tathamoddie /
Last active Aug 29, 2015
Change all ng- attributes to data-ng- instead

So, you built an AngularJS app.

You used ng- attributes everywhere, and now your W3C validation is failing.

You wish you had used data-ng- instead.

This script will fix them all for you.

.\Fix-AllAngularAttributesForHtml5.ps1 c:\code\myapp\web\Views -TfvcAware -Verbose -PrefixesToQuality @('ng', 'app')

git help {anything}

Find out about any command. For example, git help commit.

git init

Take the current folder, and turn it into a Git repo. (For when you're starting something new.)

git clone http://some/repo/foobar

tathamoddie / Find-JavaExe.ps1
Last active Jun 20, 2019
Attempting to find java.exe, on a Windows machine, in a way that's semi-reliable across Java versions, operating system versions, 32 vs 64-bit and whatever else can be thrown at us.
View Find-JavaExe.ps1
function Find-JavaExe {
Locates java.exe on the current system via common conventions.
View .gitconfig
st = status
ci = commit
br = branch
co = checkout
com = checkout master
fe = fetch origin
bn = !git for-each-ref --format='%(refname:short)' `git symbolic-ref HEAD`
rb = rebase
rbm = rebase master
You can’t perform that action at this time.