分类
- Actionscript (3)
- Git (3)
- Javascript (1)
- Life (30)
- Mac OS (6)
- PHP (3)
- Python (1)
- Ruby (2)
- Server (9)
标签
Monthly Archives: 十月 2011
给 git push 和 git pull 设置默认仓库
git config –global branch.master.remote origin git config –global branch.master.merge refs/heads/master 参考: git pull的默认地址 How do you get git to always pull from a specific branch?
Posted in Git
Leave a comment
博客文章开启评论
早期主机在国内的时候,由于众所周知的原因, 不得以全面关闭了文章的评论功能。如今已搬迁至香港机房,安全了,所以开启评论,:) PS:感谢易联主机提供空间!
Discuz X2 插件设计流程概要
基本方法 编辑 config/config_global.php,在页面底部新增如下内容以开启插件开发者模式 // 为2则会在页面上输出所有的嵌入点 $_config['plugindeveloper'] = 1; 登录到后台,完成以下工作 插件 -> 设计新插件,填入插件信息,提交 插件列表 -> 设计 -> 模块,新增“页面嵌入 – 普通版”类型的模块,程序模块可自定,这里设置为 main.class.php 插件列表 -> 设计 -> 变量,设置好插件所需要的变量(可选操作) 插件列表 -> 启用插件,方便后续调试 在插件目录下新建 main.class.php,包含全局嵌入点类和脚本嵌入点类,查看详细信息 特别注意:调试时注意随时在后台清空页面缓存 手机版 新建 mobile.class.php,类名前缀改为 mobileplugin_,其余同上 插件列表 -> 设计 -> 模块,新增“页面嵌入 … Continue reading
Git Bitbucket 使用方法
将本地代码推送到远程仓库 本地生成SSH key,并设定密码 ssh-keygen 将/.ssh/id_rsa添加到你账户下的公钥列表中 Git 中添加远程仓库 git remote add <name> git@bitbucket.org:lanisle/repo_name.git 推送代码 git push <name> master 把代码从远程仓库拖回本地 mkdir <repo_dir> cd <repo_dir> 初始化 git init Git 中添加远程仓库 git remote add <name> git@bitbucket.org:lanisle/repo_name.git 拉回代码 git pull <name> master PS: <name>表示远程仓库在本地的标识,如果为origin表示为缺省配置,可直接git push,不需要附带标识 <repo_name>表示远程仓库名称。
Posted in Git
Leave a comment
使Git for Windows支持中文显示
Git for Windows是基于Cygwin实现的,在安装后的缺省配置下,ls打印出的内容和git log输出的结果都不支持中文显示。 修复方法为编辑<Git installtion dir>/etc/profile,增加如下内容: # 自定义提示符 export PS1=’[\u@msys \W]$ ‘ # 文件夹和文件名支持中文显示 alias la=’/bin/ls -aF –show-control-chars –color=tty’ alias ll=’/bin/ls -alF –show-control-chars –color=tty’ alias ls=’/bin/ls –show-control-chars -F –color=tty’ # 使git log输出正常显示中文 export LESSCHARSET=utf-8 参考:http://www.cnblogs.com/baizx/archive/2010/08/09/1796120.html
Posted in Git
Leave a comment
Mac OS Lion 编译安装 php(with nginx)
安装nginx(当前版本 1.0.6) brew install nginx 安装目录 /usr/local/Cellar/nginx/1.0.6 编译安装PHP(当前版本 5.3.8) 主要配置参数来源于Lion自带的php,本处做了部分修改,主要包括: 移除 –with-icu-dir=/usr –enable-suhosin 移除 –with-apxs2=/usr/sbin/apxs 新增 –enable-fpm –enable-force-cgi-redirect 修正libpng和freetype库文件目录错误 移除其他无用参数 For fastcgi usage ./configure –prefix=/opt/php –with-config-file-path=/opt/php/etc –enable-fpm –enable-cgi –enable-cli –with-libxml-dir=/usr –with-openssl=/usr –with-kerberos=/usr –with-zlib=/usr –enable-bcmath –with-bz2=/usr –enable-calendar –with-curl=/usr –enable-dba –with-ndbm=/usr –enable-exif –enable-ftp –with-gd –with-freetype-dir=/usr/X11 –with-jpeg-dir=/usr/local … Continue reading