工作,学习,生活,这里将会有一些记录. 备用域名:http://meisw.wdlinux.cn 注册 | 登陆
浏览模式: 标准 | 列表2009年03月的文章

js格式化工具,html_js 工具,小工具

这两天在看一些JS代码,TMD的,长长一大段,且没有一点格式,真不知这些人是为什么要这样搞,想不易让人看懂还是喜欢这种风格.看得头都大

好在今晚找到个格式化工具,爽就一个字

http://www.51099.com/tool/js-format-compress.html 格式化及压缩

http://www.51099.com/tool/js-format-color.html  可以格式化javascript代码 并在格式化的同时对代码进行着色

http://www.51099.com/tool/html_js.html 

 http://www.51099.com/tools/jscode.htm

http://www.51099.com/tools/ucode.htm

rsync warning: some files vanished before they could be transferred

rsync warning: some files vanished before they could be transferred (code 24) at main.c(702)

rsync  version 2.6.3  protocol version 28

update
http://rsync.samba.org/
http://rsync.samba.org/ftp/rsync/

js

cygwin

一、cygwin是什么?
 简而言之,cygwin是一个在windows平台上运行的 linux模拟环境,是cygnus solutions公司开发的自由软件

http://www.cygwin.com/

Screen:Shell 孵化器(转)

Screen 这个东东真的够酷、好玩、十二分地有意思,而且也是相当地实用。Screen 就像一个 Shell 孵化器,只需一个 Shell,在 Screen 的神奇作用下,“道生一,一生二,二生三,三生万物”,想要多少个 Shell 都可以。当然,前提是只要你愿意。有了 Screen,再也不需要同时打开多个终端或者多个标签页了。还有更加好玩的在后头,在 Screen 孵化的 Shell 中执行任务,即便是你退出终端,仍然不会对它造成任何影响。稍后,同样可以再次进入 Screen 的世界。

如果你从来没有安装过 Screen,那么就执行 sudo apt-get install screen 吧。然后,在终端中输入 screen 就启动 Screen 了。按照提示按空格键或回车键开始我们的 Screen 快乐之旅吧。现在,你可以随便执行某些命令来测试,如:ls -l。接着,我们就用 Screen 来孵化一个新的 Shell,同时按组合键 ctrl-a c,同样的,你能够在这里执行命令,我们假如是 ps aux。加上最初的,那么现在在 Screen 中就有两个 Shell 了。可是,如何在这两个 Shell 间切换呢?试试 ctrl-a ctrl-a 看?是不是很方便地切换回来了呢。假如你要退出,甚至关掉终端,那么好吧,按 ctrl-a ctrl-d,屏幕会显示 [detached],你就放心的关终端吧。是的,在玩了一圈之后,你又想进入 Screen 了,怎么办?只需输入 screen -d -r 即可。

以下总结一些常用的 Screen 操作快捷键,供大家参考:

ctrl-a c:创建一个新的 Shell
ctrl-a ctrl-a:在 Shell 间切换
ctrl-a n:切换到下一个 Shell
ctrl-a p:切换到上一个 Shell
ctrl-a 0...9:同样是切换各个 Shell
ctrl-a d:退出 Screen 会话

centos5 x86_64

yum install gcc
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package gcc.x86_64 0:4.1.2-42.el5 set to be updated
--> Running transaction check
--> Processing Dependency: libgomp = 4.1.2-42.el5 for package: gcc
--> Processing Dependency: cpp = 4.1.2-42.el5 for package: gcc
--> Processing Dependency: glibc-devel >= 2.2.90-12 for package: gcc
--> Processing Dependency: libgomp.so.1()(64bit) for package: gcc
--> Processing Dependency: libgcc >= 4.1.2-42.el5 for package: gcc
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package cpp.x86_64 0:4.1.2-42.el5 set to be updated
---> Package libgomp.x86_64 0:4.1.2-42.el5 set to be updated
---> Package glibc-devel.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package libgcc.x86_64 0:4.1.2-42.el5 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-headers for package: glibc-devel
--> Processing Dependency: glibc = 2.5-24.el5_2.2 for package: glibc-devel
--> Processing Dependency: glibc-headers = 2.5-24.el5_2.2 for package: glibc-devel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package glibc-headers.x86_64 0:2.5-24.el5_2.2 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-common = 2.5-24.el5_2.2 for package: glibc
--> Processing Dependency: kernel-headers for package: glibc-headers
--> Processing Dependency: kernel-headers >= 2.2.1 for package: glibc-headers
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package glibc-common.x86_64 0:2.5-24.el5_2.2 set to be updated
---> Package kernel-headers.x86_64 0:2.6.18-92.1.22.el5 set to be updated
--> Running transaction check
--> Processing Dependency: glibc-common = 2.5-18 for package: glibc
Error: No Package Matching glibc.i686


出现Error: No Package Matching glibc.i686的问题解决办法
yum install glibc glibc.i386 --enablerepo=c532*

再yum install gcc
就OK了


c++,g++
yum install gcc-c++


web env
mysql
CFLAGS="-O3" CXX=gcc CXXFLAGS="-O3 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/www/servers/mysql --enable-assembler --with-mysqld-ldflags=-all-static --enable-thread-safe-client --with-extra-charsets=gb2312,gbk,utf8,latin1 --with-named-curses-libs=/usr/lib/libncursesw.so.5

err
/usr/lib/libncursesw.so.5: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make[2]: *** [mysql] Error 1
make[2]: Leaving directory `/home/r00t/mysql-5.0.77/client'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/r00t/mysql-5.0.77'
make: *** [all] Error 2

change
--with-named-curses-libs=/usr/lib64/libncursesw.so.5


php
./configure --prefix=/www/servers/php --with-apxs2=/www/servers/httpd20/bin/apxs --with-mysql=/www/servers/mysql --with-iconv --enable-mbstring --enable-ftp --with-libxml2-dir=/usr

err
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path...
configure: error: xml2-config not found. Please check your libxml2 installation.

yum install libxml2-devel

err
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed.  Please check the config.log for details.


ftp://xmlsoft.org/libxml2/
ftp://xmlsoft.org/libxml2/libxml2-2.7.3.tar.gz
tar zxvf
./configure --prefix=/usr/local/libxml2
make

collect2: ld returned 1 exit status
make[2]: *** [xmllint] Error 1
make[2]: Leaving directory `/home/r00t/php-5.2.9/libxml2-2.7.3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/r00t/php-5.2.9/libxml2-2.7.3'
make: *** [all] Error 2


在configure 加上 --without-zlib 可以编译通过

++
--with-libxml2-dir=/usr/local/libxml2

 

 

----------------------------------------------------------------

usr/bin/ld: /usr/local/lib/libz.a(crc32.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC/usr/local/lib/libz.a: could not read symbols: Bad value解决方法如下:

cd zlib-1.2.3 //进入zlib目录
CFLAGS="-O3 -fPIC" ./configure   //使用64位元的方法进行编译
make
make installmake clean


错误提示:
/usr/bin/ld: /usr/local/lib/libjpeg.a(jcapimin.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

进入Jpeg目录
CFLAGS="-O3 -fPIC" ./configure
make
make install-lib


在Linux-x86_64环境下编译php5
LDFLAGS="-L/usr/lib64 -L/lib64" ./configure --prefix=/

rhel 5.3

 ./configure --prefix=/www/servers/mysql --enable-assembler --enable-thread-safe-client --with-extra-charsets=gb2312,gbk,utf8,latin1

err
checking for termcap functions library... configure: error: No curses/termcap library found

++
--with-named-curses-libs=/usr/lib/libncursesw.so.5

libxml2

Records:271234