Archives
-
Paste code from Visual Studio 2015 to Windows Live Writer
Now it is close to the end of 2015, but Windows Live Writer 2012 is still the best Windows blogging tool. For years I use a Windows Live Writer plugin called VSPaste for code snippets. With VSPaste, any code in any language can be copied from Visual Studio, and paste into Windows Live Writer with 100% accurate syntax highlighting.
However, VSPaste has a problem with Visual Studio 2015 RTM (not with RC) – the pasted HTML code always has a white background: <span style=”background: white;”>code</span>. To quickly fix this, the easiest way is to decompile the source code of VSPaste.
VSPaste is a small dll located in Windows Live Writer’s plugin directory: C:\Program Files (x86)\Windows Live\Writer\Plugins\VSPaste.dll. It can be decompiled to a project with source code, by .NET reflector free trial version:
-
Download Liked Posts from Tumblr.com
After using tumblr.com for years, a lot of posts have been liked. It would be easier to look up if the contents of these posts are stored to local. Fortunately, tumblr has provided a set of APIs to make this easy, and even an API console to play with these APIs. The API client is also provided in:
-
Query Operating System Processes in C#
.NET framework provides some process APIs in System.Diagnostics.Process class. Only some basic information of process can be queried with these APIs. .NET does not have APIS for other information, for example, a process’s parent process/child processes. There are some options to query process informations, like performance counter, P/Invoke, etc. Querying Win32_Process class of WMI could be an easier way.