Skip to content

Instantly share code, notes, and snippets.

@azzlack
azzlack / gist:6935644
Created October 11, 2013 14:30
Getting auth cookie when using System.IdentityModel.Services.Tokens.MachineKeySessionSecurityTokenHandler and System.IdentityModel.Services.Tokens.SessionSecurityTokenHandler
// Need to use cookiehandler to get cookie since it's chunked. See System.IdentityModel.Services.ChunkedCookieHandler
var cookie = FederatedAuthentication.SessionAuthenticationModule.CookieHandler.Read();
@azzlack
azzlack / ReportingServices.js
Created May 29, 2013 08:01
Code for adding compatibility with Chrome, Safari, FF for SQL Server 2012 SP1 Reporting Services. Append to the file `C:\Program Files\Microsoft SQL Server\MSRS11.MSSQLSERVER\Reporting Services\ReportManager\js\ReportingServices.js`
function pageLoad() {
var element = document.getElementById("ctl32_ctl09");
if (element)
{
element.style.overflow = "visible";
}
}
@azzlack
azzlack / install.ps1
Last active December 14, 2015 22:59
Sample install.ps1 for a NuGet package that patches the umbracoSettings config file
param($rootPath, $toolsPath, $package, $project)
if ($project) {
$projectDestinationPath = Split-Path $project.FullName -Parent
### Change single element value or attribute ###
$umbracoConfigFile = Join-Path $projectDestinationPath "Config\umbracoSettings.config"
$umbracoConfig = [XML](Get-Content $umbracoConfigFile)
# Set domain prefixes to true