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
namespace System | |
{ | |
public static class DoubleExt | |
{ | |
public static bool IsZero(this double input) | |
{ | |
return Math.Abs(0 - input) < Double.Epsilon; | |
} | |
public static double Divide(this double numerator, double denominator) |
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
namespace System | |
{ | |
public static class DateTimeExt | |
{ | |
public static DateTime ToUnspecified(this DateTime dt) | |
{ | |
return DateTime.SpecifyKind(dt, DateTimeKind.Unspecified); | |
} | |
} | |
} |
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
namespace System | |
{ | |
public static class StringExt | |
{ | |
public static bool EqualsWithCaseIgnore(this string a, string b) | |
{ | |
if (a == null && b == null) | |
return true; | |
else if (a == null && b != null) |
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
using Newtonsoft.Json; | |
namespace System | |
{ | |
public static class ObjectExt | |
{ | |
public static string Dump(this object obj) | |
{ | |
return JsonConvert.SerializeObject(obj, Formatting.Indented); |
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
#!/usr/bin/env ruby | |
################################################## | |
## Sample script for friend to pull some info ## | |
## from the website ... Only did it for 1 page ## | |
################################################## | |
require 'rubygems' | |
require 'safariwatir' | |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Reactive; | |
using System.Reactive.Linq; | |
using System.Reactive.Concurrency; | |
namespace LastPriceUpdate | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Reactive.Linq; | |
namespace ScratchApp | |
{ | |
enum MessageType { Initial, Update } |
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
$ find MyDirectoryWithCSharpFiles -regex '.*cs' | while read file; do dos2unix.exe -D $file; done; |
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
using System.Net.Mail; | |
using System.Net.Mime; | |
namespace BinaryElephant | |
{ | |
public static class EmailUtility | |
{ | |
public static void Send(string to, string subject, string body) | |
{ | |
SendReport("daemon@bobbychopra.com", to, subject, body, false); |
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
using System; | |
using Plossum.CommandLine; | |
namespace ConsoleApp | |
{ | |
[CommandLineManager(ApplicationName = "ProgramName", Copyright = "Copyright (c) Bobby Chopra")] | |
internal class CommandLineOptions | |
{ | |
private string _date; |
OlderNewer