This file contains hidden or 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; | |
using System.Collections.Concurrent; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Reflection; | |
using System.Text; | |
using System.Threading; | |
using System.Threading.Tasks; |
This file contains hidden or 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.Concurrent; | |
using System.Collections.Generic; | |
using System.Dynamic; | |
using System.Linq; | |
using System.Reflection; | |
namespace Core.Common | |
{ |
This file contains hidden or 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
namespace AzManWrapperLib | |
{ | |
using AZROLESLib; | |
using System; | |
using System.Runtime.InteropServices; | |
using System.Security.Principal; | |
public class AzManAccessControlChecker : IAccessControlChecker, IDisposable | |
{ | |
#region Private Fields |
This file contains hidden or 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 log4net; | |
using PostSharp.Laos; | |
// http://exceptionalcode.wordpress.com/2010/02/17/centralizing-vsto-add-in-exception-management-with-postsharp/ | |
namespace Helpers.Vsto.ErrorHandling | |
{ | |
[Serializable] | |
public sealed class ExecutionEntryPointAttribute : OnExceptionAspect |
This file contains hidden or 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 SelectionList<T> : | |
ObservableCollection<SelectionItem<T>> where T : IComparable<T> | |
{ | |
public event EventHandler OnItemSelectionChange; | |
#region Properties | |
/// <summary> | |
/// Returns the selected items in the list | |
/// </summary> |
This file contains hidden or 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 Validate-Credentials([System.Management.Automation.PSCredential]$credentials) | |
{ | |
$ct = [System.DirectoryServices.AccountManagement.ContextType]::Domain | |
$nc = $credentials.GetNetworkCredential() | |
$principal = $nc.Domain.ToString() + "\"+ $nc.UserName.Tostring() | |
$pctx = New-Object System.DirectoryServices.AccountManagement.PrincipalContext($ct, "axaros.com") | |
return $pctx.ValidateCredentials($nc.UserName, $nc.Password) | |
} |
This file contains hidden or 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 static class CrmEntityExtensions | |
{ | |
public static OptionSetValue ToOptionSetValue(this Enum e) | |
{ | |
if (e.GetTypeCode() != TypeCode.Int32) | |
return null; | |
var val = (int)Convert.ChangeType(e, e.GetTypeCode()); | |
return new OptionSetValue(val); |
This file contains hidden or 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.Linq.Expressions; | |
using System.Reflection; | |
namespace Infrastructure | |
{ | |
/// <summary> | |
/// Class for easily getting information about a type member, | |
/// and referencing the member by name, or getting it as a |
This file contains hidden or 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
#Downloads latest paket.bootstrapper.exe from github | |
$urlbase = "https://github.com" | |
$latestPage="$urlbase/fsprojects/Paket/releases/latest" | |
$exe = "paket.bootstrapper.exe" | |
Write-Host "Parsing latest release page: $latestPage" | |
$urlRegex = '<a\s+(?:[^>]*?\s+)?href=(["''])(.*?)paket.bootstrapper.exe\1' | |
$wc=new-object net.webclient |
This file contains hidden or 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
#!/usr/bin/python | |
DOCUMENTATION = ''' | |
--- | |
module: github_repo | |
short_description: Manage your repos on Github | |
''' | |
EXAMPLES = ''' | |
- name: Create a github Repo |