• Programming

    Posted on February 23rd, 2010

    Written by Emad Ibrahim

    Tags

    , ,

    Serialize Object To Clean XML

    I hate all the junk that gets added when serializing object to XML, so here is a quick way to do it cleanly. Here is the dirty way: public static string Serialize(this object obj) { string XmlString = String.Empty; using (var memStream = new MemoryStream()) { var serializer = new XmlSerializer(obj.GetType(), string.Empty); using (var xmlText [...]

  • Programming

    Posted on May 7th, 2009

    Written by Emad Ibrahim

    Tags

    , , , , ,

    Shortening URLs with bit.ly’s API in .NET

    Shortening URLs with bit.ly’s API in .NET

    I previously wrote about shortening URLs with TinyURL’s API but my new favorite URL shortener is http://bit.ly and it also has a great API that you can use from within your .net code.  I just recently used in my twitter contest website – tweetastica. The code is also very simple.  I didn’t add all the [...]

  • Programming

    Posted on April 30th, 2008

    Written by Emad Ibrahim

    Tags

    , , , , , ,

    Ruby on Rails for a .NET Developer – Part 2

    Ok, so I thought the whole scaffolding thing was so easy and I would be done in a few minutes. I was so wrong. Nothing seemed to work right. I would call ruby script/generate scaffold Tag and it will generate all the files but the views were empty. Hmm… This is exactly what has been [...]