Category Archives: Computer Tips

programmer’s blog with good stuff and a list of great tools&library

List of programmer’s blog with cool stuff
Some .net related good posts: http://blog.tedd.no/
Graphical programmer: http://stereopsis.com/
Great .net programmer writes excellent codeproject article: http://www.nicolas-dorier.com/

List of platform:
Open slim: http://opensimulator.org/wiki/Main_Page

List of tools:
ilmerge, merge .net dll and exe into one: http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx
windows api monitor: http://www.rohitab.com/apimonitor

List of library:
Take directx and multimedia api to .net: http://slimdx.org/
GraphicsMagick is a folk of ImageMagick, it’s an image manipulation library, speed faster and size smaller than ImageMagick: http://www.graphicsmagick.org/

Others:
synthesia, on screen midi keyboard and even more: http://www.synthesiagame.com/

merge .net dlls into one with ILMerge

If you hate to distribute many .net assemblies, then a tool I have just discovered might be of help: ILMerge, the url is: http://research.microsoft.com/en-us/people/mbarnett/ilmerge.aspx

But I don’t know a good solution that could do both obfuscation and dll merge. It’s always good to keep the stuff slim but also bug free without headache.

And good to know there is a tool called: apimonitor, http://www.rohitab.com/apimonitor, should to the thing as it’s name indicates which I always want to know about.

Quick guide to config a samba server on debian to share files between windows and linux

It comes handy to setup samba server on a linux computer, for example: debian, and from there you will be able to share files to windows, the linux computer could be used as a windows computer provide file share. And you can access directory structure from a windows explorer:

access linux directory through samba from windows explorer

access linux directory through samba from windows explorer

There is already a great step by step guide here: http://www.unixmen.com/standalone-samba-in-debian-squeeze/

For me, I know the general idea and only need a quick reference to go for, so I listed a shorten steps below:
Install:
apt-get install samba

Edit the config file:
emacs /etc/samba/smb.conf

Add the content below to the end of the file:
[website]
comment = website
path = /website
valid users = @root
create mask = 0744
directory mask = 0744
writable = yes

Add username to samba:
smbpasswd -a root

Looks like it is required to add your username to samba’s own tracked list of allowed users: (of course you can add other users instead of root in your linux server, I use root here because I only want to setup a test machine for develop purpose)

Restart the server:
/etc/init.d/samba restart

That’s it, follow this quick list, you will be able to start a samba in 2 minutes for some quick use. But if you are looking for serious use, you’d better read&understand each config item in the manual.

Last by not least, an even short copy&paste block for you to make a quick start:

apt-get install samba
emacs /etc/samba/smb.conf

[website]
comment = website
path = /website
valid users = @root
create mask = 0744
directory mask = 0744
writable = yes

smbpasswd -a root
/etc/init.d/samba restart

Fix for “apache2: apr_sockaddr_info_get() failed”

My server is debian6, when I have this message when restarting apache2 from ssh, I googled around and the fix is simply add 1 line to the end of /etc/apache2/apache2.conf:

ServerName localhost

And maybe you can replace localhost there with something meaningful to you.

A wonderful feature missed from windows 7

I used to close a window in Windows XP with a combined effort of mouse and keyboard, that is:

  1. Right click the window item on the taskbar
  2. Type C on the keyboard

This combined action is easier for me because I only have to locate the relative larger item on the taskbar instead of a “X” button on the corner of the window and most likely on the corner of the screen which is very far away.

But from Windows 7, some keyboard shortcut keys seems to be removed. Do you used to close the window the same way?

MTR – my traceroute, a convenient tool to diagnose network issue

MTR – my traceroute combines the feature of traceroute and ping to discover the packet issue on the network between routers.
Available both on linux and windows.
On windows, it is called WinMTR, which is available here:
http://sourceforge.net/projects/winmtr/

creative audigy 4 + windows 7 64bit and choppy sound recording

It’s been a problem (the sound get recorded become choppy) for me after I have this combination:
creative audigy 4
windows 7 64bit

The audio recorded looks like this when displayed in a visualizer:
choppy-recording

Even with the latest driver from the creative website. A few google after, I reached this webpage:
http://social.technet.microsoft.com/Forums/en/w7itprohardware/thread/13b0fc03-5602-497e-b20f-f2c039269171
Looks like it’s the creative’s legacy driver doesn’t work well with the audiodg.exe which is new from vista and later versions. And obviously creative doesn’t want to fix this issue for this old card, although they are still selling it.

So any folks who are trying to buy this card and want to use it on windows 7 64bit, please give up this idea. You can use the card to listen to music, but it will failed to act as a card for any sound recording task and karaoke.

Let’s be careful with this sound card:
Creative Audigy 4
Model: SB0610

delete flash cookie on windows

flash player is an important part of internet life, but it stores cookie like data silently almost without your knowledge. There is always a good reason to delete things. To find it:

for windows vista and windows 7:
C:\Users\[username]\AppData\Roaming\Macromedia\Flash Player\#SharedObjects

For windows xp:
C:\Documents and Settings\[username]\Application Data\Macromedia\Flash Player\#SharedObjects

a daily life issue with svn

First of all, I just want to describe the problem here, I don’t have an answer.
Svn is a great tool to keep the version of changes, despite of all the greatness, there is an inconvenient issue when you committed to put it into heavy daily use. It doesn’t do well in this specific scenario:
If you want to rename a file, move it to a different folder or delete a file, you can easily do it in your ide or file explorer, just 1 or 2 clicks of mouse away. But then the svn lost the track of these file name based changes.
On the other hand, even when you feel the need to do these file name based changes, you operate on the svn directly, then you will make the project specific solution file outdated, in the case of C#, it is csproj.

In both cases, you have to redo the work manually on the other one to get updated.

Hopefully, there could be a solution here.

Maybe, a way to go is to let tortoiseSVN monitor the changes relate to the file name, then it adds the commands of changes to the pending commit list, the same way as it deals with the content changes inside a file.

google dns

Use google dns will help to avoid tons of weird issues when browsing the internet, if not all (Some dirty isp even sniff and change the dns response, very nasty, simply change to google dns won’t do much help in this case).

Beyond ipv4 dns, they even have a ipv6 version of the addresses, so I keep a quick note here for quick reference later:
ipv4 version:
8.8.8.8
8.8.4.4

ipv6 version:
2001:4860:4860::8888
2001:4860:4860::8844

For details: https://developers.google.com/speed/public-dns/docs/using