- 博客(47)
- 收藏
- 关注
原创 Ubuntu 10.10 上使用Git从Github克隆项目
参考 http://help.github.com/git-email-settings/ (Setting user name, email and GitHub token)$ git config --global user.name "Firstname Lastname"Sets the name of the user for all git instances on the system$ git config --global user.email "your_email@yourem
2011-03-11 13:56:00 519
原创 Ubuntu 10.10 安装Git
<br />参考文档 https://help.ubuntu.com/community/Git<br /> <br />选择一个编辑器<br />export EDITOR=vim <br /> <br />安装Git<br />sudo apt-get -y install git-core gitosis
2011-03-11 13:01:00 397
原创 在Ubuntu 10.10 上部署Nginx + Passenger 环境
到Ruby EE官网下载最新版的REE安装包(选择Ubuntu版)http://www.rubyenterpriseedition.com/download.html运行安装程序,REE将会自动安装完毕到命令行执行以保证安装成功ruby -v 执行以下命令安装Passenger /usr/local/bin/passenger-install-nginx-module 执行以下命令完成依赖库的安装apt-get install build-essentialapt-get instal
2011-03-11 12:55:00 197
原创 Ubuntu 10.10 安装MySQL服务器
参考http://wiki.ubuntu.org.cn/MySQL%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97安装MySQLsudo apt-get install mysql-server这个应该很简单了,而且我觉得大家在安装方面也没什么太大问题,所以也就不多说了,下面我们来讲讲配置。配置MySQL注意,在Ubuntu下MySQL缺省是只允许本地访问的,如果你要其他机器也能够访问的话,那么需要改变/etc/mysql/my.cnf配置文件了!下面我们一步步地来:默认的MySQL
2011-03-11 12:54:00 225
原创 在Rails3中使用mustache
这里有两个项目,一个是mustache,一个是mustache_rails3,项目地址分别如下:http://github.com/defunkt/mustachehttp://github.com/goodmike/mustache_rails3
2011-03-06 23:10:00 422
原创 主流Ruby on Rails CMS对比
<br /> <br />这里我打算拿以下一些主流的Rails based CMS进行对比,主要以几个方面进行评分,包括,基本功能,易用性,模板引擎,稳定性,性能,扩展性(插件方面)等做出一个主观的评分,满分10分。<br /> <br />typo<br /> <br /><br /><br />基本功能:<br />易用性:<br />模板引擎:<br />稳定性:<br />性能:<br />扩展性:<br /> <br />refinery<br /> <br /><br /><br /> <br
2010-12-18 19:40:00 685 1
原创 部署完nginx,最后还是遇到个问题
<br />Possible errors<br />You may get errors when calling your newly created vhost in the browser, likehttp://github.com/BadMinus/devise.git (at master) is not checked out. Please run `bundle install` (Bundler::GitError)<br />.<br />There are two alternat
2010-12-14 23:51:00 255
原创 Ubuntu上部署Spree
<br />部署到production环境:<br /> <br />参考 http://spreecommerce.com/documentation/server_configuration.html
2010-12-13 22:26:00 228
转载 更新 rhel5 中 SVN 版本
Red Hat Enterprise Linux 5 自带 subversion,自带的版本为1.4.2,可以使用如下命令查看: # rpm -qa|grep subversion subversion-1.4.2-2.el5 若没有显示则说明没有安装相应包,不过没关系,反正也是要升级到最新版本,老版本的有没有无所谓了。 subversion目前最好的可用版本是1.6.5,
2009-12-10 10:59:00 177
原创 Script.aculo.us Autocompleter problem in IE (首次过滤时在IE不显示的情况)
参考:http://stackoverflow.com/questions/108650/script-aculo-us-autocompleter-problem-in-iehttps://prototype.lighthouseapp.com/projects/8887/tickets/32-ajax-autocomplete-in-ie-with-doctypehttp://de
2009-11-07 11:15:00 172
转载 input 文本框 文字垂直居中对齐 ie firefox
input 文本框 文字垂直居中对齐 ie firefox 在ie中文字垂直居中对齐的话:在css中把line-height的属性设置成height的高度即可。但在ff中似乎不管用,在网上查了一下得到如下结果:浏览器支持所有浏览器都支持 line-height 属性。这就奇怪了,既然支持为什么不居中呢?解决这个问题可以用pading设置上下填充,但是如果文本框有背景图片的话就会向
2009-11-05 09:19:00 406
原创 关于使用actionmailer发送邮件 [更新]
昨天发了一篇使用tls发送邮件的文章,给Marc review后他给了一个更好的解决方案,使得代码更加neater!废话不说,上连接:http://douglasfshearer.com/blog/gmail-smtp-with-ruby-on-rails-and-actionmailer
2009-10-06 12:51:00 256
原创 关于使用actionmailer发送邮件
今天搞了一下,发现按照正常方式不能通过gmail的SMTP发邮件,后来找了很多资料,发现如果rails http://github.com/openrain/action_mailer_tls/
2009-10-05 20:41:00 197
原创 Rails中关于约定查询条件的写法
Its very cool!!ActiveRecord::default_scope(options = {}) Sets the default options for the model. The format of the options argument is the same as in find. class Person < ActiveRecord::B
2009-09-14 14:14:00 209
转载 X61 T61 休眠后自动重启与耗电问题
ThinkPad X61 或者 T61 休眠以后经常马上自动重启,而且即使休眠成功了经过十几小时后仍旧会消耗掉10%~20%的电量。原因在于开启了网卡和调制解调器的唤醒功能。查看方法:命令行中输入:powercfg /devicequery wake_programmable显示可以唤醒的设备输入:powercfg -devicequery wake_armed显示已经设置为可以唤醒的设备解决:在
2009-08-31 09:15:00 619
原创 bat FOR命令的一些变量
FOR命令中有一些变量以及他们的用法先把FOR的变量全部列出来: ~I - 删除任何引号("),扩展 %I %~fI - 将 %I 扩展到一个完全合格的路径名 %~dI - 仅将 %I 扩展到一个驱动器号 %~pI - 仅将 %I 扩展到一个路径 %~nI
2009-08-02 12:35:00 1011
原创 javascript保留小数
function formatFloat(value, pos){ return Math.round(value * Math.pow(10, pos)) / Math.pow(10, pos); }
2009-08-01 22:28:00 150
原创 regular-expressions 【IP Addresses】
IP AddressesMatching an IP address is another good example of a trade-off between regex complexity and exactness. /b/d{1,3}/./d{1,3}/./d{1,3}/./d{1,3}/b will match any IP address just fine, but will
2009-07-26 21:56:00 214
原创 Dynamically loading external JavaScript and CSS files
The conventional way to loading external JavaScript (ie: .js) and CSS (ie: .css) files on a page is to stick a reference to them in the HEAD section of your page, for example:link rel="styleshee
2009-07-23 11:40:00 220
转载 MySQL数据库编码相关设置命令
MySQL默认的编码不是UTF-8的,但是作为中文用户,为了国际化,还是要用UTF-8编码,这个问题很简单。首先可以用下面的命令看一下MySQL的编码格式mysql> show Variables like %set%;会得到类似下面这样的输出+--------------------------+----------------------------+| Variable_name |
2009-07-20 20:49:00 2927
原创 关于创建MySQL UTF-8数据库
如果只想给某个数据库或表设置为UTF8的编码,可以用下面的MySQL命令mysql> CREATE DATABASE IF NOT EXISTS my_db DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
2009-07-20 20:47:00 519
原创 SVN 中制作tag
$ svn copy http://svn.example.com/repos/calc/trunk / http://svn.example.com/repos/calc/tags/release-1.0 / -m "Tagging the 1.0 release of the calc project."Committed revision 351.
2009-07-20 09:39:00 277
原创 关于CVS中出现cannot open /cvsroot/xxx/CVSROOT/config: Permission denied的问题
RedHat linux中有一个叫selinux的东西,它倒置了CVS读不到config文件,如果出现问题了就把selinux关了就好了..(个人感觉应该像是进程防火墙的意思,有机会再详细研究下,实际上关了好像不太好..).. 关闭的方法: setenforce 0
2009-05-15 15:00:00 1513
转载 HOW-TO Install and Configure a CVS Repository Server
Assumptions:RedHat 6.1 InstalledRepository will reside in /usr/local/cvsroot. You can change this.Needed:CVS v1.10.6-2 is installed (RPM is on RedHat CD if not already installe
2009-05-03 20:21:00 455
原创 ultrasphinx: Anonymous modules have no name to be referenced by
今天在Linux上安装好ultrasphinx后, 打算跑一下rake ultrasphinx:configure生成配置文件.结果运行期间出现提示 Anonymous modules have no name to be referenced by 根据rake --trace 提示,找到了出错的地方,修改了一下,便可以运行了 I was able to fix the p
2008-12-17 14:01:00 220
原创 IE6 Double Margin Bug Fix
I know this doesn’t pertain to anyone reading this except me I’m sure. I’m simply writing this up so I’ll have a reference for later when I encounter the same problem in my wonderful world of css. Non
2008-11-29 10:46:00 290
转载 linux删除目录
linux删除目录很简单,很多人还是习惯用rmdir,不过一旦目录非空,就陷入深深的苦恼之中……直接rm就可以了,不过要加两个参数-rf 即:rm -rf 目录名字-r 就是向下递归,不管有多少级目录,一并删除-f 就是直接强行删除,不作任何提示的意思需要提醒的是:使用这个rm -rf的时候一定要格外小心,linux没有回收站的当然,rm还有更多的其他参数和用法,man rm就可以查看
2008-11-28 11:31:00 358
转载 Linux下解压小全
tar -I或者bunzip2命令都可以解压.bz2文件 tar xvfj example.tar.bz2 tar xvfz example.tar.gz tar xvfz example.tgz tar xvf example.tar unzip example.zip tar -jvxf some.bz,就是把tar的zvxf 改成jvxf zip/tar rh8下有一个图形界面的软件file
2008-11-28 11:17:00 167
转载 在Windows 2003环境下配置 PHP 5.2.5 + Apache HTTP Server 2.2.8 + MySQL 6.0
安装Apache1. 文件下载地址为:http://httpd.apache.org/download.cgi2. 关闭IIS3. 运行apache_2.2.8-win32-x86-openssl-0.9.8g.msi安装Apache(关闭了IIS),使用的默认80端口,安装目录为C:/ Apache4. 如果不使用默认的80端口,则在安装完成后将httpd.conf的第46行从Listen 80
2008-09-22 10:13:00 675
原创 Rails production 中出现uninitialized constant Digest::SHA1 解决办法
今天在Rails production中登录时发现了500错误,提示uninitialized constant Digest::SHA1,于是上网搜资料,如下: Im trying to deploy a rails app to joyent/textdrive for the first time. All works well until I try to access Dig
2008-09-19 15:22:00 1043
转载 PhotoShop 中英对照
一、File-(文件) 1.New-(新建) 2.Open-(打开) 3.Open As-(打开为) 4.Open Recent-(最近打开文件) 5.Close-(关闭) 6.Save-(存储) 7.Save As-(存储为) 8.Save for Web-(存储为Web所用格式) 9.Revert-(恢复) 10.Place-(置入) 11.Import-(输入) -(1)PDF Image
2008-09-07 11:54:00 302
原创 Installing the Subversion Client with SSL Support on Linux
Today I needed to take a Red Hat Linux box and get the Subversion client running on it so I could check out some source from a secure repository. Initially, building and installing Subversion was a sn
2008-09-04 08:54:00 540
转载 远程连接到mysql
1、进入mysql,创建一个新用户xuys:格式:grant 权限 on 数据库名.表名 用户@登录主机 identified by "用户密码";grant select,update,insert,delete on *.* to xuys@192.168.88.234 identified by "xuys1234"; 查看结果,执行: use mysql;
2008-08-25 09:26:00 438
转载 创建 Subversion 服务
最方便的方法是开启 Subversion 服务。具体方法如下:假设 Subversion 安装在 C:/Program Files/Subversion,版本库放在了 C:/SvnRepos,那么可以用下面的命令来安装服务,sc create svn binpath= "/"C:/Program Files/Subversion/bin/svnserve.exe/"
2008-08-21 20:50:00 417
转载 自定义rails中的error_messages_for方法输出内容
def error_messages_for(*params) #add by glchengang key_hash = {} if params.first.is_a?(Hash) key_hash = params.first params.delete_at(0) end
2008-08-21 13:41:00 589
转载 Flash+ColdFusion全新概念建站
coldfusion的定义ColdFusion可以从两方面来定义,它既是一种应用服务器也是一种编程语言。很多开发人员常常把它们当成一件事,他们用ColdFusion语言(CFML - ColdFusion Markup Language)来编写应有程序,并把编写的应用程序运行在ColdFusion服务器上。 但是用ColdFusion语言编写的应用程序可以运行在其它支持CFML的应用服务器上,
2008-08-20 14:34:00 225
转载 ColdFusion介绍
ColdFusion(直译:冷聚变),是一个动态Web服务器,其CFML(ColdFusion Markup Language)是一种程序设计语言,类似现在的JSP里的JSTL(JSP Standard Tag Lib),从1995年开始开发,其设计思想被一些人认为非常先进,被一些语言所借鉴。Coldfusion 最早是由 Allaire 公司开发的一种应用服务器平台,其运行的
2008-08-20 14:31:00 1646
转载 什么是YAML?
作者 liubin http://www.ruby-cn.org/本文地址 http://www.ruby-cn.org/articles/what_is_yaml.html 1.YAML ="YAML Aint Markup Language"官方网站的解释是YAML ="YAML Aint Markup Language"(缩写为YAML)。这是一种数据序列化(seria
2008-08-20 09:51:00 303
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人