Android编译日志显示的进度百分比之
android 编译时候前面的百分比123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657build/soong/ui/status/log.goreturn fmt.Sprintf("[%3d%% %d/%d] ", 100*counts.FinishedActions/counts.TotalActions, counts.FinishedActions, counts.TotalActions)func (s formatter) progress(counts status.Counts) string { if s.format == "" { return fmt.Sprintf("[%3d%% %d/%d] ", 100*counts.FinishedActions/counts.TotalActions, ...
Android关于AndroidBoard.mk和AndroidProducts.mk
关于 android 中的 AndroidBoard.mk AndroidProducts.mk
Linux学习之bash中实现并发执行命令
Linux: shell实现多线程, Forking / Multi-Threaded Processes | Bash, shell 线程池简单介绍按照shell语法,后一个前台命令必须等待前一个前台命令执行完毕才能进行,这就是所谓的单线程程序。
如果两条命令之间有依赖性还好,否则后一条命令就白白浪费了等待的时间了。
网上查了一遍,shell并没有真正意义上的多进程。而最简单的节省时间,
达到“多线程”效果的办法,是将前台命令变成后台进程,这样一来就可以跳过前台命令的限制了。
全前台进程:12345678910#!/bin/bash#filename:simple.shstarttime=$(date +%s)for ((i=0;i<5;i++));do { sleep 3;echo 1>>aa && endtime=$(date +%s) && echo "我是$i,运行了3秒,整个脚本执行了$(expr $endtime - $starttime)秒" } ...
奇迹MU之角色技能介绍
Data\Skill\SkillList.xml 文件里面存放了技能
每一个技能都保存为一个 Skill 元素节点
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152<Skill ID="1" 技能ID唯一编号,估计存放到数据库里面也是用的这个数字? Name="Poison" 技能名,这个翻译过来是 毒药 Level="30" Damage="12" 伤害值? ManaCost="42" 蓝的消耗,魔法消耗 StaminaCost="0" 耐力消耗 Distance="6" 距离 EffectRadio="5" Delay="0" ...
Jenkins学习之登录认证自定义SecurityRealm类介绍
12Pluggable security realm that connects external user database to Hudson.
这里介绍一下 jenkins的登录认证 相关的
分析 active-directory-plugin/, ldap-plugin/, script-realm-plugin/ 这几个插件
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103UserPrincipalName:指定要由客户端进行身份验证的服务的用户主体名称 (UPN)。一个用户帐户名(有时称为“用户登录名”)和一个域名(标识用户帐户所在的域),这是登录到Windows域的标准用法。格式是: x ...
Jenkins学习之参数定义createValue方法介绍
1Defines a parameter for a build.
这里介绍一下 几个 createValue() 方法, 这些都是抽象方法,需要子类去实现的
12345678910 /** * Create a parameter value from a form submission. * * <p> * This method is invoked when the user fills in the parameter values in the HTML form * and submits it to the server. */ @CheckForNull public abstract ParameterValue createValue(StaplerRequest req, JSONObject jo);这个方法就是在jenkins 的job上 点击 Build with Parameters 时候会调用到这个方法里面.
12345678910111213141516171 ...
Jenkins插件学习之External-Monitor-Job
jenkins的不同项目类型之外部任务项目今天介绍一下jenkins的不同项目类型之外部任务项目
这种外部任务项目靠这个 External Monitor Job 插件来实现的。External Monitor Job Type1.7下面是jenkins wiki上对这种类型项目的一共描述。
Jenkins is useful for monitoring the non-interactive execution of processes, such as cron jobs, procmail, inetd-launched processes. Often those tasks are completely unmonitored (which makes it hard for you to notice when things go wrong), or they send e-mails constantly regardless of the success or failure (which results into the same situation as you ...
Jenkins学习之master服务器安装
jenkins学习之master服务器安装参考https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins+on+Ubuntu
https://wiki.jenkins-ci.org/display/JENKINS/Installing+Jenkins
Installation1234567wget -q -O - https://pkg.jenkins.io/debian/jenkins-ci.org.key | sudo apt-key add -sudo sh -c 'echo deb http://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'sudo apt-get updatesudo apt-get install jenkins
UpgradeOnce installed like this, you can update to the later version of Je ...
Jenkins插件学习之docker-agent
inbound-agent1docker run --init jenkins/inbound-agent -url http://192.168.1.111:8080/jenkins -workDir=/tmp/node1/ws '896bc4ecdbbe6f567dd2ba34889f55e5cc17c17c9e09b692f4398beeeaf3addc' 'node1'
Jenkins学习之常用推荐的几个plugin安装
jenkins学习之plugin安装
插件名称
安装的插件的版本
github地址和对应的分支名称
备注说明
Hidden++ Parameter plugin
0.0.6
https://github.com/mamh-java/hidden-parameter-plugin/tree/hidden-parameter-0.0.6-for-jenkins-2.249.3
新增 hide string(单行文本) 和 hideText (多行文本) 2个类型的参数。
Active Choices Parameter Plugin
2.5.7
https://github.com/mamh-java/active-choices-plugin.git
仿照extensible-choice-parameter-plugin插件修改的。提供了几个ChoiceListProvider类型的class供选择。 本来是3个类型的 param的。现在改成一个,其他的都用provicer提供
Build Name and Description Setter
2.1.1
http ...
Kubernetes学习之Ubuntu下的k8s集群安装部署
kubernets 集群安装部署(ubuntu系统)kubernets 集群安装部署安装 Docker所有节点都需要安装 Docker。
1apt-get update && apt-get install docker.io
安装 kubelet、kubeadm 和 kubectl在所有节点上安装 kubelet、kubeadm 和 kubectl。
kubelet 运行在 Cluster 所有节点上,负责启动 Pod 和容器。
kubeadm 用于初始化 Cluster。
kubectl 是 Kubernetes 命令行工具。通过 kubectl 可以部署和管理应用,查看各种资源,创建、删除和更新各种组件。
123456apt-get update && apt-get install -y apt-transport-httpscurl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -cat <<EOF >/etc/apt/sour ...
Linux学习之限制ssh免密执行的命令
限制ssh免密秘钥ssh命令的执行Restrict to single command in authorized_keys
背景先说下背景
就是希望 服务器 上配置的这个 免密的公钥 只能执行 特定的命令。
例如,只能执行 rsync 命令,把我这台主机下面的 某个目录的数据备份出去,
只能出,不能进,就是防止 rsync 命令用反了我这台关键服务器上的数据冲掉。
如何实现在公钥前面加上一个 command 配置
123456: ~ $ cat .ssh / authorized_keys ssh-rsa AAAAB3NzaC1yc2EAAAAAABABAAABAQCj98R [ ... ]: ~ $ cat .ssh / authorized_keys command = "date" ssh-rsa AAAA [ ... ]
rrsync 工具这个工具 就是专门用来 我之前的那种需求的。这个工具好像是一个 perl 脚本。
https://serverfault.com/questions/965053/restricting-a-ssh-key-to- ...