分页: 9/29 第一页 上页 4 5 6 7 8 9 10 11 12 13 下页 最后页 [ 显示模式: 摘要 | 列表 ]
Dec 25
在windows下我习惯于使用search and replace软件进行搜索文件中是否存在某个字符串.
现在在linux下也能这样操作了.将以下代码保存为searchcontent.sh
find $1 -iname "$2"|while read filename
do
    code=`cat $filename |grep $3 -nr`
    if [ "$code" != "" ];then
        echo $filename
        echo $code
    fi
done|more

设置searchcontent.sh为可执行
chmod +x ./searchcontent.sh

使用该脚本搜索文件
./s.sh /www/238000_net/ "*.php" "eval"

搜索/www/目录下的后缀为php的文件中是否存在eval字符串,如果存在输出文件名及代码的内容
Dec 11
今天我老婆在弄公司的一个视频,但制作完后发现文件太大了.竟然有4G多(家里还没有可以这么大的U盘呢.),还好视频制作软件提供了一个播放模式.可以把用于播放的的文件都出导一个文件.但这样子不方便传送.所以需要把文件转成一个可以直接运行的exe就解决了.

1,需要的文件先使用7z压缩播放的文件压缩成一个7z的压缩文件(setup.7z).
点击在新窗口中浏览此图片
Nov 14
dwz是一个富客户端框架,基于jquery开发的.能让开发员写最小的js,开发出好用的软件.

但我在使用的时候发现部分问题.这个框架会先加载全部使用的到js,然后每次与服务端的请求都使用ajax进行.然后入到当前页面的代码里.
点击在新窗口中浏览此图片
Nov 12
在使用Git Push代码到数据仓库时,提示如下错误:

[remote rejected] master -> master (branch is currently checked out)
remote: error: refusing to update checked out branch: refs/heads/master
remote: error: By default, updating the current branch in a non-bare repository
remote: error: is denied, because it will make the index and work tree inconsistent
remote: error: with what you pushed, and will require 'git reset --hard' to match
remote: error: the work tree to HEAD.
remote: error:
remote: error: You can set 'receive.denyCurrentBranch' configuration variable to
remote: error: 'ignore' or 'warn' in the remote repository to allow pushing into
remote: error: its current branch; however, this is not recommended unless you
remote: error: arranged to update its work tree to match what you pushed in some
remote: error: other way.
remote: error:
remote: error: To squelch this message and still keep the default behaviour, set
remote: error: 'receive.denyCurrentBranch' configuration variable to 'refuse'.
To git@192.168.1.X:/var/git.server/.../web
! [remote rejected] master -> master (branch is currently checked out)
error: failed to push some refs to 'git@192.168.1.X:/var/git.server/.../web'

这是由于git默认拒绝了push操作,需要进行设置,修改.git/config添加如下代码:

    [receive]
    denyCurrentBranch = ignore

在初始化远程仓库时最好使用 git --bare init   而不要使用:git init
   如果使用了git init初始化,则远程仓库的目录下,也包含work tree,当本地仓库向远程仓库push时,   如果远程仓库正在push的分支上(如果当时不在push的分支,就没有问题), 那么push后的结果不会反应在work tree上,  也即在远程仓库的目录下对应的文件还是之前的内容,必须得使用git reset --hard才能看到push后的内容.
Nov 11
一直以来很多人都在讨论git的强大.但一直忙于正常的开发,所以没时间去研究这个版本管理系统.

分页: 9/29 第一页 上页 4 5 6 7 8 9 10 11 12 13 下页 最后页 [ 显示模式: 摘要 | 列表 ]