ITeye博客

qlqllu dev

qlqllu · 共 63 篇文章

Run jshint when git commit

#!/bin/sh # # Run JSHint validation before commit. files=$(git diff --cached --name-only --diff-filter=ACMR -- *.js) pass=true if [ "$files" != "" ]; then for file in ${files}; do result=$(jshint ${file}) if [ "$result" != "" ]; then echo $result pass=false fi done fi if $pass; then exit 0 else ech…

2014-05-27 17:38 · git · 评论(0)

git用一个分支替换另外一个分支

被替换的分支叫bereplaced, 替换的分支叫replacer git checkout replacer git merge -s ours bereplaced git checkout bereplaced git merge replacer

2014-05-15 14:29 · git · 评论(0)

maven download source

mvn dependency:sources -DincludeGroupIds=org.ocpsoft.rewrite

2014-04-25 15:48 · maven · 评论(0)

use jenkins to build github project

1. install github plugin 2. use gitbash, ssh-keygen to generate ssh key 3. Go to system setting ,set git executable path, please note use: C:\Program Files (x86)\Git\cmd\git.exe, not C:\Program Files (x86)\Git\bin\git.exe 4, create a job, set repository url (git@xxx.git), credentials(use private ke…

2014-03-18 17:24 · CI · git · 评论(0)

git 临时忽略本地文件

文件在仓库中存在,但是不想每次修改后就提交(这样的文件一般是与本机开发环境相关的文件),可以这样操作: 1. 打开.git/config文件 2. 增加 [alias] ignore = update-index --assume-unchanged unignore = update-index --no-assume-unchanged ignored = !git ls-files -v | grep "^[[:lower:]]" 3. 运行 git ignore filename 这样,再次提交时这个文件的修改就不会被提交。如果需要再次提交这个文件,运行 git unignore f…

2013-10-29 15:44 · git · 评论(0)

chrome cors 请求在localhost下失败

chrome在做cors请求时,如果server是localhost,会失败,参考: https://code.google.com/p/chromium/issues/detail?id=67743 有如下几种处理方式: 1. 增加header http://williamjohnbert.com/2013/06/allow-cors-with-localhost-in-chrome/ 2. 在hosts中做映射,把127.0.0.1映射成一个域名

2013-08-27 15:21 · javascript · chrome · 评论(0)

git查看删除文件的历史版本

1. git log -- filename 2. git show commitid:filename

2013-08-26 17:52 · git · 评论(0)

手机浏览器web应用调试

1. Install weinre: http://people.apache.org/~pmuellr/weinre/docs/latest/Home.html npm -g install weinre 2. Run weinre: weinre options weinre --boundHost hostname/IP --httpPort 8081 3. Add a script tag into web page: <script src="http://a.b.c:8081/target/target-script-min.js"></script> 4. Access htt…

2013-08-12 12:58 · nodejs · weinre · 评论(0)

nodejs debug

1. 运行node --debug app.js, 或者 node --debug-brk app.js 2. 运行node-inspector 3. 运行 http://localhost:8080/debug?port=5858

2013-08-11 16:07 · nodejs · 评论(0)

tomcat配置https

参考: http://tomcat.apache.org/tomcat-7.0-doc/ssl-howto.html 1. 创建keystore 进入tomcat目录,执行 keytool -genkey -trustcacerts -keyalg RSA -alias tomcat -dname "cn=your domain, ou=org, o=org, c=cn" -keypass changeit -keystore .keystore -storepass changeit 2.修改server.xml 2.1 打开https的connector 2.2 指定刚才创建的keyst…

2013-08-02 11:32 · tomcat · ssl · 评论(0)

git-undo-reset-or-revert

Git undo, reset or revert? If you have found this page you probably came here since you wanted to clear your working directory from all the changes that you have made. The simple answer is: # Clear working directory tree from all changes $ git checkout -f HEAD This is, however, not the best way to …

2013-08-01 09:54 · git · 评论(0)

phonegap应用的权限

phonegap应用最少需要下面的权限才可以启动起来,不知道为啥。 <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

2013-07-22 23:09 · phonegap · 评论(0)

git常用操作

1. git常用命令 http://www.xbc.me/git-commands/ http://blog.csdn.net/sunboy_2050/article/details/7529022 2. git命令图 http://www.cnblogs.com/1-2-3/archive/2010/07/18/git-commands.html 3. remove tag or branch Removing a git tag: git tag -d <tag> Removing a git branch: git branch -d <branch> Push tag to remo…

2013-06-08 09:10 · git · 评论(0)

配置apache使用php

httpd.conf LoadModule php5_module "c:/php-5.4.14/php5apache2_2.dll" PHPIniDir "C:/php-5.4.14" <IfModule mime_module> 中增加 AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps <IfModule dir_module> 变成 <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> 注…

2013-04-27 15:18 · apache · php · 评论(0)

dojo style.set(node, {backgroundColor: color}) can't work in IE

dojo的 style.set(node, {backgroundColor: color}) can't work in IE, 改成 dojo style.set(node, {background: color})

2013-04-15 15:47 · dojo · 评论(0)