Monday, June 1, 2009

How To Connect VPN With PPTP Client

If you are using Linux or other UNIX like operating systems and you want to create VPN connection to Company's network, you can use these sample configurations:
In /etc/ppp/chap-secrets:
# for PPTP server (Windows VPN server) without domain
your_username server_name "your_password" *
# for PPTP server with domain
your_domain\\your_username server_name "your_password" *

To connect to PPTP server without domain

In /etc/ppp/peers/server_name:
pty "pptp server_name --nolaunchpppd"
require-mppe-128
lock
noauth
nobsdcomp
nodeflate
name chaitat
remotename server_name
ipparam server_name

To connect to PPTP server with domain

In /etc/ppp/peers/server_name:
pty "pptp server_name --nolaunchpppd"
lock
noauth
nobsdcomp
nodeflate
name your_domain\\your_username
remotename server_name
ipparam server_name
refuse-eap
refuse-chap
refuse-mschap
require-mppe-128
You might also have to do a post configuration after connecting by adding a route to Company's internal ip addresses:
# route add -net 10.10.0.0 netmask 255.255.0.0 gw [the ip address of the gateway you are connected to]
e.g. route add -net 10.10.0.0 netmask 255.255.0.0 gw 10.10.13.10

How To Break An RCS Lock

Here's how to break a lock.

  1. cp file file.BAK
  2. rcs -u file
  3. rcs -l file
  4. edit file
  5. diff file file.BAK
  6. put back any changes if any that you clobbered by breaking the lock
  7. rcs -u file

Coveo Search With French Interface

To use French Interface, you have to use this (assuming that you are using Coveo Search on ASERVER):

<iframe src="http://aserver:8888/default<# IF language_id == 2 PRINT "-fr" ENDIF #>.aspx?sk=duckass (live)&q=<# PRINT StrToHtml(q) #>" style="width: 900px; height: 600px; overflow-x: hidden; overflow-y: auto" frameborder="0"></iframe>

Basically, it is that you have to use:

http://aserver:8888/default-fr.aspx

How can I know which files have been changed between releases? It seems like cvs diff applies per file basis. Please advise.

It seems there's no obvious way to diff between specific revisions or tags using tortoise UI. However you can do it on the command line.

If you have cvsnt installed (I guess it comes with tortoise), try this

cd $the_proj_root_you_checked_out_using_tortoise # eg. Z:/duckass
cvs diff -r DUCKASS_1-0-0_RELEASE_20080619_001 -r DUCKASS_1-0-0_RELEASE_20081112_002

But if you do this on unix with unix's cvs, try this

cd $the_proj_root_you_checked_out_using_tortoise # eg. /projects/work/duckass
cvs -d duck@duckserver:/projects/cvsroot diff -r DUCKASS_1-0-0_RELEASE_20080619_001 -r DUCKASS_1-0-0_RELEASE_20081112_002

The two cvs recognizes CVSROOT differently, so you need that -d option if you checked out with tortoise but want to diff with unix's cvs.

How To Export As Text File Using Any Separator Character

Reference: http://office.microsoft.com/en-us/excel/HP011305991033.aspx
You can change the separator character used in both delimited text files and comma separated values (CSV) text files.

Change the delimiter in a delimited text file

For a delimited text file, you can change the delimiter from a Tab character to another character in the second page of the Text Import Wizard. From the same wizard page, you can also change the way consecutive delimiters, such as consecutive quotes, are handled.

Change the separator in a CSV text file


  1. Click the Windows Start menu.

  2. Click Control Panel.

  3. Open the Regional and Language Options dialog box.

  4. Click the Regional Options Tab.

  5. Click Customize.

  6. Type a new separator in the List separator box.

  7. Click OK twice.
Note After you change the list separator character for your machine, all applications will use the new character. You can change the character back to the original character by using the same procedure.

How To Open VBA Editor In Microsoft Excel 2007

simply press ALT + F11


.
.

CGI with IIS6

If the CGI pages appear as "404 Not Found" even after mapping the apropriate extension to a CGI application, then you may have to do something like

iisext.vbs /AddFile "C:\Program Files\Python\Python.exe %s" 1 Python 1 Python

how to search string in files on unix system

Here is an example to search string in .cgi files in every directory (including current directory), you use this command:

$ find . -name '*.cgi' -exec grep -n 'string to search for' {} \; -print

disc got stuck in macmini

June 1, 2009

A dvd disc got stuck in my macmini last week.  I searched through the Internet and found nothing that could help me resolve the issue.  Fortunately, after rebooting my computer for around 10 times, the disc icon appeared on the desktop and I could properly eject it.  I am no kidding!


July 3, 2010

Today, my disc got stuck again.  But this time I could eject it properly by running this command in Terminal:

$ drutil eject

How to Set Host Name in Windows

Host name or hostname represents the mapping between ip addresses and host names.

The file is stored in:

C:\Windows\System32\drivers\etc\hosts