Wednesday, April 29, 2009

uni2ascii

If you are ever having issues with g++ compiling code cut and pasted from a website, specifically stuff like "stray \200 on line" or other similar errors, then uni2ascii is for you.

Just take the problem file, and do the following

cat problem.cpp | uni2ascii -B > problem_clean.cpp

The uni2ascii program will do it's very best to convert unicode to ascii where possible.

The new file should compile okay. Remember the -B, if you forget it, you will have lots of random unicode escapes in your output.

Labels: , ,

Sunday, September 23, 2007

Remote Assistance Helper - if this is what I think it is

If this is what I think it is, I cant wait to try it out. I spent a lot of time searching for a tool like this last week. It seems to be code for generating remote assistance requests in a single click. Something i've wanted to do for a while to set up an easy way for users to generate a remote assistance request targeted to the IT staff at work.


Remote Assistance Helper on Codeplex.com

By the way, their site layout is really clean and cool. I like it when code sharing sites dont have the "5000 links per page look."

Update: The site is run by Microsoft, and even I, the consummate microsoft hater, will admit, it looks damn good. Description from the site:

CodePlex is Microsoft's open source project hosting web site. You can use CodePlex to create new projects to share with the world, join others who have already started their own projects, or use the applications on this site and provide feedback. A word about Microsoft’s role: Microsoft does not control, review, revise, endorse or distribute the third party projects on this site. Microsoft is hosting the CodePlex site solely as a web storage site as a service to the developer community.


I'm hoping to find lots of good .NET source code here.

Labels: , ,

Tuesday, September 18, 2007

Some reading for me

Windows software update service

Using Group policy to deploy applications

Multiple monitor control panel: Ultramon

Remote Desktop vs VNC

Windows Desktop Sharing API

Terminal Services Team Blog - WDS API Introduction - bummer, only available on windows vista or above.

Offering remote assistance API - "Summary: This whitepaper details the information necessary to build a customized solution based on the Offer Remote Assistance feature of Remote Assistance. The objects and sample code provided below may be used to integrate the Offer Remote Assistance solution into the workflow of a help desk organization. (23 printed pages)"

Access add/remove programs information

Get list of installed programs via registry

Wrapping the windows installer API in C#

Working with Delegates in C#

Terminology:
Static method handlers
instance method handlers
delegates
factory method

Other random info:
Tivo HME Development Kit - developing custom applications for Tivo, to be run on your home network.

Labels: , , ,

Thursday, September 06, 2007

Converting a web page to plain text, like code samples that are in HTML

I came across a very interesting article on using Lynx or Linemode console web browsers to convert a HTML formatted page to plain text. This comes up more often than I would like since I often find code snippets online in HTML form that have been syntax highlighted. However if I just copy these items to the clipboard, then try to paste in vim in a terminal, the spacing gets all messed up. I'm not sure if i'm doing something wrong there, but this seems to be a good alternative.

For example, this page PHP_GNUPlot.htm shows some PHP code I want to use internally. It's syntax highlighted. I'd prefer to have a plain text version that I can scp to my web development box and just start testing.

This is where lynx comes in. Right on my web development box. I run the command

lynx -dump "some-URL" > my-text

Update: I forgot that in Firefox, IE, and Mosaic you can just go to File/Save As to save the page as plain text, which solves your problem right there. Either way, it's still nice to have a way to do this strictly from the terminal, so I'll leave this article up.



Resources:

http://www.w3.org/Tools/html2things.html

Labels: , , ,