Tuesday, December 08, 2009
Linux command to find which dynamic library defines the function getaddrinfo
busybox root bootstrap
echo root:x:0:0:root:/root:/bin/sh > /etc/passwd
chmod 755 /etc/passwd
touch /etc/shadow
now run login -f root, then you can use adduser to add other users
Monday, December 07, 2009
public DNS server

This is a list of public DNS server
Courtesy: http://radoff.com/blog/2009/12/07/google-dns-benchmarking-and-rationale/
Wednesday, December 02, 2009
development environment of VS2008 Express
1. Copy file c:\program files\Visual Studio 9.0\common7\tools\vsvars32.bat to your directory such as c:\tools
2. run c:\tools\vsvars32. This sets up the environment variables, most importantly $PATH
3. use "vcbuild" to build VC project or solutions. You can also use "msbuild" which is want vcbuild calls.
VCBUILD Command Line
The VCBUILD tool uses the following command line syntax to build Visual C++ projects and solutions.
VCBUILD [options] [project | solution] [config | $ALL]
Flags
options
Build options. For more information, see VCBUILD Options.
VCBUILD also reads options from the VCBUILD_DEFAULT_OPTIONS environment variable.
project
The name of a project file.
If the project parameter is not specified and only one .vcproj file is in the directory, the project specified by the .vcproj file is built.
solution
The name of a solution file.
config
The name of a project configuration to build; for example, DEBUG.
If no configuration is specified, and the VCBUILD_DEFAULT_CFG environment variable is set, the configuration it specifies is built. If it is not set, all configurations are built.
$ALL
A symbolic name that means build all configurations.
Remarks
To cancel the build process, press CTRL+C or CTRL+BREAK.
VCBUILD Options
VCBUILD has the following options:
| Option | Description |
| Specifies outputting only clean build outputs. | |
| Specifies prefixing error lines that are outputted to stdin, stdout, stderr with the string argument. | |
| Specifies creating an import library for a DLL configuration. | |
| Specifies prefixing information lines that are outputted to stdin, stdout, stderr with the string argument. | |
| Specifies performing a link without building sources. | |
| Specifies using file as the build log. | |
| Specifies printing commands and response file to the screen. | |
| Specifies the number of concurrent builds to run. | |
| Displays error and warning messages without colorization. | |
| Specifies not generating an import library. | |
| Specifies that .NET Framework 3.5 will be used for all assembly references when upgrading a CLR project from a previous version of Visual Studio. | |
| Specifies performing pass 0 (MIDL) of Build.exe. | |
| Specifies performing pass 1 (compile) of Build.exe (implies /implib). | |
| Specifies to perform pass 2 (link) of Build.exe (implies /noimplib). | |
| Only builds configurations for the given platform. | |
| Specifies cleaning build outputs and then performs a build. | |
| Logs the time it takes to complete the build. | |
| Upgrades the project file to the latest supported format. | |
| Uses the environment variables for PATH, INCLUDE, LIBS, and LIBPATH. | |
| Prefixes warning lines with a user-defined string. |
Tuesday, November 10, 2009
Use objdump to do library depency check
Generally, things that are trying to determine shared library
dependencies should use something like objdump, not ldd:
objdump -p $f | awk '/ NEEDED / { print $2 }'
Friday, November 06, 2009
bash history autocomplete
Add the following to your .bashrc file.
# make bash autocomplete with up arrow
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
A good tcp serial port server on Linux: remserial
remserial at http://lpccomp.bc.ca/remserial/
Wednesday, November 04, 2009
Linux process view: top and htop
http://htop.sourceforge.net/
Tuesday, November 03, 2009
Fix IP Phone for Gizmo
1. You are behind the router that uses a NAT. You may experience call completion problems behind this router:
2. You are behind the SIP compatible router. You are now ready to make free world-wide calls to other SIP phones...:
From Boatman on the Gizmo forum: Suggested settings for ATAs behind one or more NAT routers.
(under SIP tab)
Handle_VIA_received: yes
Handle_VIA_rport: yes
Insert_VIA_received: yes
Insert_VIA_rport: yes
Substitute_VIA_Addr: yes
Send_Resp_To_Src_Port: yes
STUN_Enable: yes
STUN_Server: stun01.sipphone.com:3478
NAT_Keep_Alive_Intvl: 179
(under Line_1 and Line_2 tabs)
NAT_Mapping_Enable: yes
NAT_Keep_Alive_Enable: yes
NAT_Keep_Alive_Msg: 0000 <-- sometimes just leaving this blank works
NAT_Keep_Alive_Dest: $PROXY
Register Expires: 3600
Sometimes it's preferable to configure the ATA to work without stun. This optional configuration is less easily
portable but allows phone service to continue no matter if the stun server is working.
If you want to do this perform the following steps.
1. Forward the SIP ports and the RTP port range from the router to the ATA.
2. Set "STUN Enable:" no
3. Set "NAT Keep Alive Enable:" no
4. In order for the ATA to know it's public IP address, make sure the ATA is registered with at least one SIP registrar, or enter your public IP address in "EXT IP:".
When done dial *0 or *0# to check that your RTP contact address is correct.
Src: http://www.google.com/support/forum/p/voice/thread?tid=68aac21378df83fc&hl=en