This file contains 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 IPAddressExtensions | |
{ | |
/// <summary> | |
/// Tests if a given IPv4 address is within any of the private | |
/// IP address ranges, 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16 | |
/// </summary> | |
/// <param name="address"></param> | |
/// <returns>True if the address is private, otherwise false. | |
/// Note: IPv6 address always returns false</returns> | |
/// <exception cref="NotSupportedException">For unknown address families (other than IPv4 and IPv6)</exception> |
This file contains 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 EnumerableExtensions | |
{ | |
public static IEnumerable<T> ToEnumerable<T>(this T item, bool nullAsEmpty = true) | |
{ | |
if (EqualityComparer<T>.Default.Equals(item, default(T)) && nullAsEmpty) | |
yield break; | |
yield return item; | |
} | |
public static bool None<TSource>(this IEnumerable<TSource> source, Func<TSource, bool> predicate) |
This file contains 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
var argv = require('argv'); | |
var https = require('https'); | |
var xml2js = require('xml2js'); | |
var inspect = require('eyes').inspector({maxLength: false}); | |
var gpio = require('gpio'); | |
var xmlParser = new xml2js.Parser(); | |
var teamCityHost = 'your team city host'; |
NewerOlder