Skip to content

Instantly share code, notes, and snippets.

View kcargile's full-sized avatar
🏃‍♂️
Building something rad

Kristopher Cargile kcargile

🏃‍♂️
Building something rad
View GitHub Profile
@kcargile
kcargile / aws-ip-ranges-us-east-201912.txt
Last active December 21, 2019 21:47
List of AWS us-east IP address ranges for ALL service types, suitable for use in Jetpack whitelists (e.g. for Zapier integration)
#generated on 2019-12-21; note that addresses may have rotated
#Query from the AWS-provided JSON: https://jqplay.org/s/5lYUBsvGS0
#AWS JSON: https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html#filter-json-file
#Genrate range from CIDRs: https://www.ipconvertertools.com/cidr2ipranges#
52.95.245.0-52.95.245.255
54.196.0.0-54.197.255.255
216.182.224.0-216.182.231.255
52.119.224.0-52.119.231.255
216.182.232.0-216.182.235.255

Keybase proof

I hereby claim:

  • I am kcargile on github.
  • I am kcargile (https://keybase.io/kcargile) on keybase.
  • I have a public key whose fingerprint is B379 CA72 1096 B573 EDDA 8A09 E870 2B38 97D2 94AF

To claim this, I am signing this object:

@kcargile
kcargile / ConfigurableFilterProvider.cs
Created August 8, 2014 13:32
Inject Castle Windsor Dependencies into ASP.NET Web API Filter C#
using System.Collections.Generic;
using System.Diagnostics;
using System.Web.Http;
using System.Web.Http.Controllers;
using System.Web.Http.Filters;
using Castle.Windsor;
using Algorythmic.Web.API.Filters;
namespace Algorythmic.Web.API.Windsor.Filters
{
@kcargile
kcargile / ImageExtensions.cs
Created December 7, 2013 17:43
.NET extension method for comparing System.Drawing.Images instances by value.
namespace Extensions
{
/// <summary>
/// Contains <see cref="object"/> extension methods.
/// </summary>
public static class ImageExtensions
{
/// <summary>
/// Determines if the two object are equavalent in a way that will not throw if the current obejct is null.
/// </summary>
@kcargile
kcargile / States-Abbreviated.ascx
Last active December 29, 2015 03:29
ASP.NET US states as static drop down lists.
<asp:DropDownList ID="ddlState" runat="server">
<asp:ListItem Value="AL">AL</asp:ListItem>
<asp:ListItem Value="AK">AK</asp:ListItem>
<asp:ListItem Value="AZ">AZ</asp:ListItem>
<asp:ListItem Value="AR">AR</asp:ListItem>
<asp:ListItem Value="CA">CA</asp:ListItem>
<asp:ListItem Value="CO">CO</asp:ListItem>
<asp:ListItem Value="CT">CT</asp:ListItem>
<asp:ListItem Value="DC">DC</asp:ListItem>
<asp:ListItem Value="DE">DE</asp:ListItem>
@kcargile
kcargile / ObjectExtensions.cs
Created June 9, 2013 14:28
Calculates a hash for an object in such a way that will not throw of affect the value if the object is null.
namespace Extensions
{
/// <summary>
/// Contains <see cref="object"/> extension methods.
/// </summary>
public static class ObjectExtensions
{
/// <summary>
/// Calculates a hash for the object in such a way that will not throw or affect the value if the object is null.
/// </summary>
@kcargile
kcargile / IEnumerableExtensions.cs
Created September 21, 2012 16:20
.NET Clones a collection into an array of the specified type.
namespace Extensions
{
/// <summary>
/// Extension methods for classes that implement the <see cref="IEnumerable"/> interface.
/// </summary>
public static class IEnumerableExtensions
{
/// <summary>
/// Converts the collection to an array that is a deep copy of the source list.
/// </summary>
@kcargile
kcargile / IEnumerableExtensions.cs
Created September 21, 2012 16:18
.NET Clones a collection in a way that is safe even it if it null.
namespace Extensions
{
/// <summary>
/// Extension methods for classes that implement the <see cref="IEnumerable"/> interface.
/// </summary>
public static class IEnumerableExtensions
{
/// <summary>
/// Clones the list in a way that is safe even it if it null.
/// </summary>
@kcargile
kcargile / ObjectExtensions.cs
Created September 14, 2012 19:29
.NET Clones the current instance in a way that is safe even it if it null.
namespace Extensions
{
/// <summary>
/// Contains <see cref="object"/> extension methods.
/// </summary>
public static class ObjectExtensions
{
/// <summary>
/// Clones the current instance in a way that is safe even it if it null.
/// </summary>
@kcargile
kcargile / ObjectExtensions.cs
Created September 14, 2012 18:39
.NET Determines if the two objects are equivalent in a way that will not throw if either is null.
namespace Extensions
{
/// <summary>
/// Contains <see cref="object"/> extension methods.
/// </summary>
public static class ObjectExtensions
{
/// <summary>
/// Determines if the two objects are equivalent in a way that will not throw if either is null.
/// </summary>