- 博客(195)
- 收藏
- 关注
原创 Ubuntu setup kodexplorer
1. Setup XAMPPDownload XAMPP:https://www.apachefriends.org/index.html Install XAMPPhttps://www.apachefriends.org/faq_linux.html 2. Setup KODExplorerDownload:http://www.kalcaddle.com...
2017-06-28 12:40:20
330
原创 Copying files from host to Docker container
The cp command can be used for that. For example:docker cp foo.txt mycontainer:/foo.txtdocker cp mycontainer:/foo.txt foo.txt https://docs.docker.com/engine/reference/commandline/cp/http:...
2017-06-26 14:53:46
313
原创 lxml.etree
http://www.cnblogs.com/bluescorpio/archive/2013/06/09/3127964.htmlhttp://blog.youkuaiyun.com/u012063703/article/details/51754665http://www.jianshu.com/p/f446663c970f 1. 判断是否有子元素或子节点使用len(element...
2017-06-21 10:48:34
360
原创 How to modify existing, unpushed or pushed commits?
https://stackoverflow.com/questions/179123/how-to-modify-existing-unpushed-commits Amending the most recent commit messagegit commit --amendwill open your editor, allowing you to change the c...
2017-06-20 16:43:19
353
原创 git diff提示filemode发生改变(old mode 100644、new mode 10075)
今天在提交代码之前 git status了一下,发现一片红啊~每个git库下的所有文件都飘红了,抽什么疯啊? 我不可能修改那么多~~git diff 了一下,发现都是diff --git a/Android.mk b/Android.mkold mode 100644new mode 100755原来是filemode的变化,文件chmod后其文件某些位是改变了...
2017-06-10 09:32:09
479
原创 Playing With Gerrit Jira Plugin
Playing With Gerrit Jira PluginAug 5th, 2014Build and Setup1. Clone the Gerrit source:1$ git clone https://gerrit.googlesource.com/gerrit2. Checkout to version 2.8 (2....
2017-06-09 16:10:48
550
原创 Gerrit mysql error: Communications link failure
fatal: DbInjector failed fatal: Unable to determine SqlDialect fatal: caused by com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure fatal: fatal: Th...
2017-05-24 15:31:33
433
原创 mysql卸载重装 invoke-rc.d: initscript dkimproxy, action "start" failed. dpkg:处理 dkim
invoke-rc.d: initscript dkimproxy, action "start" failed.dpkg:处理 dkimproxy (--configure)时出错: 子进程 已安装 post-installation 脚本 返回了错误号 2dpkg:依赖关系问题使得 dtc-toaster 的配置工作不能继续: dtc-toaster 依赖于 dkimproxy...
2017-03-29 20:28:49
1280
原创 ubuntu12.04下OpenLDAP的安装部署
1、ldap server OS:ubuntu server 12.04 2、ldap 软件: OpenLDAP 2.4.28 一、ldap服务的配置与使用 1、修改主机域名 Java代码 vi /etc/hosts 127.0.1.1 ldapserver.my.com.cn ldapserver 安装软件时默认创建的base DN取决于本机域名,...
2017-03-29 11:39:34
224
原创 查看什么进程占用了3000端口
查看什么进程占用了3000端口fuser -n tcp 3000结果为:3000/tcp: 941 然后kill -9 941
2017-03-24 14:48:52
2446
原创 Gerrit replication.config
replication.config[remote "slave "]# url = ssh://user@172.16.2.35:29418/${name}.git url = ssh://gerrit2@172.16.2.35/home/gerrit2/review_site/git/${name}.git push = +refs/heads/*:refs/he...
2017-03-16 19:15:24
1501
原创 Gerrit命令
查看可见的群组 ssh -p 29418 admin@localhost gerrit ls-groups#创建新的项目,--owner需要的群组必须要在Gerrit已经定义好的 ssh -p 29418 admin@localhost gerrit create-project "test/helloworld" --description "'Tools used by build...
2017-03-10 10:33:20
2017
原创 Make Gerrit look for new repositories
Command line alternativeCopy bare Git repository into ~/gerrit_testsite/git/myproject.gitMake Gerrit look for new repositories:$ ssh -p 29418 alexadmin@localhost gerrit flush-caches --cache pro...
2017-03-08 19:01:34
154
原创 Python dictdiffer模块比较两个字典
http://dictdiffer.readthedocs.io/en/latest/ Dictdiffer Dictdiffer is a helper module that helps you to diff and patch dictionaries.InstallationDictdiffer is on PyPI so all you need i...
2017-03-04 17:51:08
4807
原创 gitlab 项目迁移
gitlab项目迁移: 一: 场景 目前有2个gitlab server,需要将gitlab-A server项目迁移到另外一个gitlab-B server.二: 步骤 1. 在gitLab-B上新建组和项目,组和项目名称和gitlab-A的组合项目名称一一对应。 2. 将gitlab-A项目clone到本地 git clone htt...
2017-03-04 11:45:52
930
原创 Gerrit reviewer plugin
https://gerrit.googlesource.com/plugins/reviewers/+doc/master/src/main/resources/Documentation/config.md ConfigurationGlobal configuration of the @PLUGIN@ plugin is done in the reviewers.config...
2017-02-20 11:20:57
946
原创 One or more refs/for/ names blocks change upload
One or more refs/for/ names blocks change uploadversion v2.12.7Table of ContentsWith this error message Gerrit rejects to push a commit for code review if the remote git repository ...
2017-02-16 12:23:21
402
原创 Python的高级Git库 Gittle安装使用方法
本文为大家讲解的是Python的高级Git库 Gittle安装使用方法,Gittle是一个高级纯python git 库。构建在dulwich之上,提供了大部分的低层机制。Install itpip install gittleExamples :Clone a repositoryfrom gittle import Gittle repo_path = '/tm...
2017-02-15 18:29:18
716
原创 GitPython 库
GitPython is a python library used to interact with git repositories. It provides abstractions of git objects for easy access of repository data, and additionally allows you to access the git reposit...
2017-02-15 18:25:59
620
原创 python 判断一个对象是否可迭代
如何判断一个对象是可迭代对象呢?方法是通过collections模块的Iterable类型判断: >>> from collections import Iterable >>> isinstance('abc', Iterable) # str是否可迭代True >>> isinstance([1,2,3], I...
2017-01-23 09:44:37
529
原创 python create_issue_link
new_issue = 'TEST-1000'parent_issue = 'TEST-2000' jira.create_issue_link( type="Duplicate", inwardIssue=new_issue, outwardIssue=parent_issue, comment={ ...
2017-01-22 11:26:33
784
原创 给python交互式命令行增加自动补全和命令历史
在用户目录下新建".pythonstartup"文件,写入以下内容:# python startup fileimport readlineimport rlcompleterimport atexitimport os#tab completionreadline.parse_and_bind('tab: complete')#history f...
2017-01-22 10:09:16
275
原创 Why does Gerrit not include the change-id into merge commits?
The underlying problem in Git is that commit-msg hooks are not called for merge commits without conflicts.However, the prepare-commit-msg is called for (any) merge commits. So what I cu...
2017-01-20 10:23:17
144
原创 python 字典格式化
import pprint data = {'a': {'c': 3, 'b': 2}, 'c': {'c': 3, 'b': 2}, 'b': {'c': 3, 'b': 2}, 'e': {'c': 3, 'b': 2}, 'd': {'c': 3, 'b': 2}, 'g': {'c': 3, 'b': 2}, 'f': {'c': 3, 'b': 2}}pp = pprint...
2017-01-16 13:57:24
786
原创 python最简洁的条件判断语句写法
这篇文章主要介绍了Python返回真假值(True or False)小技巧,本文探讨的是最简洁的条件判断语句写法,本文给出了两种简洁写法,需要的朋友可以参考下如下一段代码:12345def isLen(strString): if len(strString)>6: return True ...
2017-01-11 20:11:31
1000
原创 linux查找目录下的所有文件中是否含有某个字符串
查找目录下的所有文件中是否含有某个字符串 find .|xargs grep -ri "IBM" 查找目录下的所有文件中是否含有某个字符串,并且只打印出文件名 find .|xargs grep -ri "IBM" -l...
2017-01-11 16:47:49
123
原创 How to use gerrit gsql -c option
You have to ensure the quotes end up in the gsql shell.ssh -p29418 <host> gerrit gsql -c '"select * from accounts;"'(first single quote ' , then double quote " ) gerrit gsql -c "\"select *...
2017-01-06 19:35:34
753
原创 Docker私有仓库Registry的搭建验证
1. 关于Registry官方的Docker hub是一个用于管理公共镜像的好地方,我们可以在上面找到我们想要的镜像,也可以把我们自己的镜像推送上去。但是,有时候,我们的使用场景需要我们拥有一个私有的镜像仓库用于管理我们自己的镜像。这个可以通过开源软件Registry来达成目的。 Registry在github上有两份代码:老代码库和新代码库。老代码是采用python编写的,存在pul...
2017-01-05 18:09:26
227
原创 如何修改Jenkins默认的8080端口
1. vim /etc/init.d/jenkins, 修改 do_start 函数的 check_tcp_port 命令,端口号从 8080 换成 8081.2. vim /etc/default/jenkins 文件,将端口 8080 改成 8081.3. service jenkin restart4. ps -def|grep java...
2017-01-05 11:46:19
1158
原创 Shipyard 安装
url -s https://shipyard-project.com/deploy | bash -sDeploying Shipyard -> Starting Database -> Starting Discovery -> Starting Cert Volume -> Starting Proxy -> Starting Swa...
2017-01-05 10:28:38
151
原创 date显示当前日期
echo `date +%F\ %T` 查找当前文件数量echo `find ./ -type f -print|wc -l`
2016-12-27 15:56:28
124
原创 shell编程——if语句 if -z -n -f -eq -ne -lt
shell编程中条件表达式的使用 if 条件then Commandelse Commandfi 别忘了这个结尾If语句忘了结尾fitest.sh: line 14: syntax error: unexpected end of fi if 的三种条件表达式ifcommandthen...
2016-12-27 14:11:02
149
原创 How to remove group and project in Gerrit ?
Group1. access gerrit sql database cmd: ssh -p 29418 150.236.40.165 gerrit gsql2. gerrit> delete from ACCOUNT_GROUP_NAMES where name='group name';3. gerrit> delete from ACCOUNT_GROUPS where ...
2016-12-26 15:35:42
740
原创 Pygerrit - Client library for interacting with Gerrit Code Review
https://github.com/sonyxperiadev/pygerrit Pygerrit provides a simple interface for clients to interact with Gerrit Code Review via ssh or the REST API.This repository is no longer actively mai...
2016-12-20 14:11:07
411
原创 python 格式化json
#!/usr/bin/env python# -*- coding: utf-8 -*-import osimport sysimport json reload(sys)sys.setdefaultencoding("utf-8") with open('output.json') as f: data = json.load(f) #...
2016-12-19 20:07:43
421
原创 集成 Jira Gerrit Jenkins
http://blog.sina.com.cn/s/blog_88b00ea80101d2l3.htmlhttp://dongyupu.github.io/2015/08/15/Gerrit-Review-connect-Jira/ Gerrit and Jira connect , there are many waysIn Jira : JIRA Gerrit Plu...
2016-12-14 14:17:12
1801
原创 Sublime Text 套件介紹(四):Pretty JSON
http://www.camdemy.com/media/7427JSON,一個輕量級的資料交換語言,目前許多網站AJAX request的回應結果都是JSON格式 以下是一個標準的JSON格式 123456789101112131415161718192...
2016-12-13 12:58:18
364
原创 ubuntu12.04安装LDAP服务器和客户端
http://www.cnblogs.com/xwdreamer/p/3469951.htmlhttps://www.digitalocean.com/community/tutorials/how-to-install-and-co...https://www.digitalocean.com/community/tutorials/how-to-authenticate-c...LDAP...
2016-11-28 13:05:30
215
原创 git 取得两个 tag 之间的 commit
参考:http://stackoverflow.com/questions/5863426/get-commit-list-between-tags-in-git git log --pretty=oneline tagA...tagBIf you just wanted commits reachable from tagB but not tagA:git log -...
2016-11-26 13:10:12
1335
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人