http://blog.joncairns.com/2013/12/understanding-ssh-agent-and-ssh-add/ 很多时候我们要使用我们的私钥的时候,我们都需要输入我们的密码,然后才能正常的使用私钥去登陆远程主机,去git pull我们的repo, 去干一些事,但是,我们并不想每一次都输入(安全原因咱是不考虑)……
jenkins和github整合(webhook)
Jenkins和github的简单整合(SCM)
centos 撘建jenkins
首先,jenkins是一个java程序,所以,我们要先安装java环境:
1 |
sudo yum install java-1.8.0-openjdk.x86_64 |
然后我们设置一下环境变量
1 2 3 4 |
sudo cp /etc/profile /etc/profile_backup echo 'export JAVA_HOME=/usr/lib/jvm/jre-1.8.0-openjdk' | sudo tee -a /etc/profile echo 'export JRE_HOME=/usr/lib/jvm/jre' | sudo tee -a /etc/profile source /etc/profile |
然后,我们更新一下repo
1 |
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins-ci.org/redhat-stable/jenkins.repo |
[crayon……
python中的去除重复
在日常数据的处理中,难免会遇到数据的处理,然后很多时候我们需要将重复的数据去掉,当然,我们可以写一段代码来做这个处理例如:
1 2 3 4 5 6 7 8 9 10 11 |
#!/usr/bin/env python #coding=utf-8 origh_list = [6,3,1,2,4,5,3] new_list = [] for item in origh_list: if not item in new_list: new_list.append(item) print(sorted(new_list)) |
其实,我们有更简单的方法,python已经内置了这种解决方式,那就是set [crayon-642248735ba95747538307……