Author Archives: admin

auto mount a windows folder share on debian startup for development purpose

Auto mount a windows folder share on debian startup could be your honey if you run into this situation:
1. run linux as a website server development environment
2. most of your tools with good ui only run under windows
To bridge this gap, you want to have linux access to your windows share, and this is how to do it:
work on the windows:

  1. create a user “linuxweb” with the password “1y1cc1″ (please use your own values in your situation)
  2. share your work folder as “workproject” and make sure the user “linuxweb” you created have all the permission

work on the linux:

  1. create the mount point by these commands:
    mkdir /website
    mkdir /website/winworkproject
  2. setup auto mount on debian boot, run:
    pico /etc/rc.local
    and add this line to the file:
    mount -t cifs // -o username=linuxweb,password=1y1cc1,uid=www-data,gid=www-data /website/winworkproject

One problem:
There is one problem I run into during this adventure: I initially tried to auto mount the share by fstab:
// /website/winworkproject cifs username=linuxweb,password=1y1cc1,uid=www-data,gid=www-data 0 0
but got an error saying:
CIFS VFS: cifs_mount failed w/return code = -112
I have no clue what code -112 is, then I have to do it by rc.local and it looks work well. Please leave a comment below if you know what code -112 is, thanks!

sendmail is being slow on linux

sendmail is very easy to install and use with php on linux. But it could be slow by default configuration. The reason which I ran into is because the server doesn’t configured with a qualified host name and it keeps retrying. To fix the issue:
and set the ip for your domain like this:

I haven’t got the whole picture of this, but this quick fix does work. Hope it could also help you if you are demand a quick solution.

Video To Gif

Video to gif is a tool to convert a small portion of video clip into gif animation. From there, you can post to forum or send to friends to show off something fun.
download     buy now


video to gif

video to gif

How to use:

  1. Select the video file you want to convert to gif.
  2. And then choose the start time and end time in the video that you want to convert to the gif. You can use the text box to fine tune the time for the region of the video.
  3. Change the fps value to specify how many frames a second that you want to have your gif to play at. The smaller the fps value is, the slower the animation will appear.
  4. If you don’t want all the frames, select from “use every x frames” drop down list to skip a few frames. Be aware that if you skip more frames, the faster the animation will appear. You’d better reduce the fps value to compensate for the frames you skipped here.
  5. Finally, use the drag bar to resize and set for the size of the final gif.
  6. Click the “Start” button to start create the gif, the gif will be auto named with the same name as your input video file and will be created in the same directory. If the conversion success, you can click on the file name to open the folder.

Cautious: The more frames you want to pack into the gif and the bigger size you specified for the gif, the longer time it will take to create the gif. So be prepared to wait for several minutes or even tens of minutes if this is your case.


  • drag and drop to specify the beginning and end of the video portion you want to convert to the gif
  • be able to fine tune the start and end of the video with text box
  • be able to specify the fps value that gif will be played back
  • be able to skip a few frames if not all that is useful
  • resize to the desired size for gif
  • preview of the frames
  • auto create the name of the gif file

Download below and start to use it now. Also feel free to leave comment below.
download     buy now

Solution to missing mkstemp when you are compiling under mingw

I googled around, doesn’t find a perfect solution. But I do come across 2 files on apple website, they actually implement the missing functions while dealing with the code ported to mingw.

For my scenario, I simply created a compiler based branch:
#if defined(__MINGW32__)

int mkstemp(char *template)
char *filename = mktemp(template);
if (filename == NULL)
return -1;
return open(filename, O_RDWR | O_CREAT, 0600);


I also downloaded and attached here in case could be useful later:

Easy Screenshot

Easy Screenshot is a tool to help you take screenshot easily. It’s very easy to use, only takes 3 steps: Capture, Crop and Save, that’s it!


easy screenshot

easy screenshot

How to use:

Take the screenshot with quick capture window
Start the application, you will see a “quick capture window” at the bottom right corner of your screen. Click the “Capture” button you will be able to capture the screen.

Take the screenshot with keyboard (shortcut keys)
To capture the full screen, press Prt Scr, and then you will be able to cut the area your want from it.
To capture the active window, press Alt+Prt Scr.

Crop the screenshot from full screen mode
Click Capture button or press Prt Scr on keyboard to get into full screen crop mode.
Use mouse to click and drag a rectangular box around the area your want to crop
Click Crop button or press Enter key to apply the crop process
If you want to save the whole screen, press Ctrl+A in crop mode, and press Crop button
If you are not satisfied with the selected area, do it again to make another selection.


  • Capture and crop screenshot
  • Keyboard shortcut to capture screenshot: Prt Scr or Alt+Prt Scr
  • Always on top quick capture button to make it easy to capture with mouse
  • Auto rename filename when there is conflict during save
  • Copy screenshot to clipboard
  • Upload screenshot to wordpress with a click of button
  • You can also upload to Media->library or post as a published post directly
  • Save screenshot in png, jpg, gif formats
  • Be able to auto start when system boot

Download below and start to use it now. Also feel free to leave comment below.

Easy Screen Recorder

Easy Screen Recorder is a tool to recorder your computer screen activity into video file. You can use it to record your screen and show it to your friends or colleagues.

An easy way to start is do the recording and upload to youtube. And also you can share it on your blog. For the private stuff, send the video over email or with your favorite IM.

This program is very easy to use and totally free. Click the button below to download:

The Screen shot of Easy Screen Recorder:

Easy Screen Recorder

Easy Screen Recorder


  • Record audio with the video
  • Be able to select the source of audio, for example: microphone, mixer of the sound card, multiple sound cards are supported in case you have more than one
  • 3 type of recordings are supported: by selected area, selected window or full screen.
  • Record the video in mp4 or swf format
  • Define the frame rate of recording
  • Specify the folder to save the recorded video
  • A nice timestamped file name will be auto generated for the recorded video

Download now to start use the Easy Screen Recorder, and you are welcome to leave a comment below:

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:
Graphical programmer:
Great .net programmer writes excellent codeproject article:

List of platform:
Open slim:

List of tools:
ilmerge, merge .net dll and exe into one:
windows api monitor:

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

synthesia, on screen midi keyboard and even more: