Twitter

Nice insights on crowd funding: https://t.co/obxkW0C9nj 😼

2 weeks ago

Follow

Rainbow CSV for #VSCode : simple and elegant 👍🌈 https://t.co/LDEpaO4TEB

4 weeks ago

Follow

Need finer control over your screen brightness? There a #PowerShell script for that: https://t.co/uUCyIaN6j6

1 month ago

Follow

Parsing objects to XML with attributes can be quite a challenge in #PowerShell : https://t.co/CqH9W1XgNM

1 month ago

Follow

Categories

Tag: .Net

.NET

Auto fill settings objects with .config values

Lately I’ve been playing around with some API’s. Most of them need a bunch of settings that I’m storing them in my config files. I found myself doing the same work over and over again: creating a settings class, filling the class with information and using it. So I came up with a way to leverage reflection to fill my setting classes with .config values.

.NET

How to scrape a photo from a Twitter Photo URL with C#

Twitter uses its url shortener to place photo’s in Tweets. I’ve tried processing these URLs in the browser, but cross site scripting measures prevented me from processing the result with jQuery.

I decided to resolve it in C# (as I’m using ASP.Net). The following script leverages a WebClient and a regular expression to extract the photo URL from the shortened URL. This code could be added to a handler or a webservice that can be called from script.