Skip to content

Instantly share code, notes, and snippets.

Mark Ingalls marking

Block or report user

Report or block marking

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

Keybase proof

I hereby claim:

  • I am marking on github.
  • I am mark_ingalls ( on keybase.
  • I have a public key ASAuVdU6QtF03i1koCSvsF59q3CQZHVZUsiE0dcy5GBZrAo

To claim this, I am signing this object:

marking / Invoke-KMSEncrypt-Example.ps1
Created Jul 12, 2016 — forked from Sam-Martin/Invoke-KMSEncrypt-Example.ps1
PowerShell Example for using Invoke-KMSEncrypt and Invoke-KMSDecrypt
View Invoke-KMSEncrypt-Example.ps1
# Stolen from and
function ConvertFrom-StringToMemoryStream{
$stream = New-Object System.IO.MemoryStream;
$writer = New-Object System.IO.StreamWriter($stream);
marking / invokeWithCookie.ps1
Created Mar 14, 2016 — forked from lawrencegripper/invokeWithCookie.ps1
Invoke-webrequest With Cookie
View invokeWithCookie.ps1
$downloadToPath = "c:\somewhere\on\disk\"
$remoteFileLocation = "http://somewhere/on/the/internet"
$session = New-Object Microsoft.PowerShell.Commands.WebRequestSession
$cookie = New-Object System.Net.Cookie
$cookie.Name = "cookieName"
$cookie.Value = "valueOfCookie"
View AppServiceUtilities.cs
public static IList<T> Get<T, I>()
where T : class
where I : IRepository<T>
using (var assembleContainer = BuildAssembleContainer())
return assembleContainer.Resolve<I>().List();
View AppServiceUtilities.cs
public static void SaveUser(User userToSave)
using (var assembleContainer = BuildAssembleContainer())
var userRepository = assembleContainer.Resolve<IUserRepository>();
var user = userRepository.GetById(userToSave.Id);
if (user == null)
throw new ArgumentException(string.Format("A User with id={0} does not exist in the database", userToSave.Id));
You can’t perform that action at this time.