Skip to content

Instantly share code, notes, and snippets.

@anilmujagic
anilmujagic / gist:5173812
Created March 15, 2013 22:57
Serializing Exception to JSON using Json.NET and ServiceStack.Text
static void Main(string[] args)
{
try
{
var x = 1 / args.Length;
}
catch (Exception ex)
{
Console.WriteLine(Newtonsoft.Json.JsonConvert.SerializeObject(ex));
Console.WriteLine();
@anilmujagic
anilmujagic / ILoveFSharp.html
Created December 7, 2015 12:19
F# |> I ❤
<span style="font-family: Monaco, Consolas, 'Courier New', Courier, monospace; font-weight: bold; font-size: xx-large;">F# |> I <span style="color: red;">&#10084;</span></span>
@anilmujagic
anilmujagic / SQLiteDecimalRoundTrip.sql
Created November 22, 2019 12:22
SQLite losing decimals on DB round trip
CREATE TABLE item (amount NUMERIC(18, 7) NOT NULL);
INSERT INTO item VALUES (12345678901.1234567);
SELECT * FROM item; -- 12345678901.1235